Task #1 Character and String Class Methods
1. Copy the files [login to view URL] (Code Listing 9.1) and [login to view URL] (Code Listing 9.2) from the StudentCD or as directed by your instructor.
2. In the [login to view URL] file, add conditions to the decision structure which validates the data. Conditions are needed that will:
a. Check the length of the String
b. Check the position of the colon
c. Check that all other characters are digits
3. Add lines that will separate the String into two substrings containing hours and minutes. Convert these substrings to integers and save them into the instance variables.
4. In the TimeDemo class, add a condition to the loop that converts the user’s answer to a capital letter prior to checking it.
5. Compile, debug, and run. Test out your program using the following valid input: a. 00:00
b. 12:00 c. 04:05 d. 10:15 e. 23:59 f. 00:35
And the following invalid input: a. 7:56
b. 15:78 c. 08:60 d. 24:00 e. 3e:33 f. 1:111
Task #2 [login to view URL] and the StringBuilder Class
1. Copy the file [login to view URL] (Code Listing 9.3) from the Student CD or as directed by your instructor. This file is only one line long. It contains 2 sentences.
2. Write a main method that will read the file [login to view URL], separate it into word tokens.
3. You should process the tokens by taking the first letter of every fifth word, starting with the first word in the file. Convert these letters to uppercase and append them to a StringBuilder object to form a word which will be printed to the console to display the secret message.
7 freelancers are bidding on average $55 for this job
Hi, Im an experience Java developer and have hands-on experience working on various projects. I've read your project details and can complete it in a day. Ping me to discuss further.
As a Software Engineer I have good skill set to design and develop application.I can deliver you the product that meet your requirement. Let disscuss the project.