Please do the readings from the book and also read this entire assignment before lab this week!
/*
Your Name
Your ID Number
Your Username
Which Assignment
Your Laboratory Section Number
*/
Fully document your code with meaningful comments. Use a consistent and readable indentation scheme. You will be graded on both the correctness of your programs and the style in which they are written.
This is not a test! If you have any trouble at all with these programs, your AI will be happy to help you!
Here's a sample run.
Enter a four letter word: frog
The word frog is gorf backwards.
Do not worry about what happens if the user enters a word which is longer or shorter than four characters.
You will need to make use of the substring method in the String class. This function is described on page 68 of the text.
Save your program as Backwards.java.
Here's a sample run.
Please enter the year: 1988
Please enter the month: 2
Please enter the day: 28
One week after 2/28/1988 is 3/6/1988.
Here's another example:
Please enter the year: 1987
Please enter the month: 12
Please enter the day: 30
One week after 12/30/1997 is 1/6/1998.
Consult the table on page 91 of the text for a handy list of the methods available in the Time class. All of the get methods return an int type value. The addseconds method does not return a value; it actually updates the object itself by changing its internal state. We call such a method a mutator.
Save your program as Week.java.
Please take care to use the exact filenames specified in the problems below.
Welcome to the Typing Test!
Please type the following sentence exactly as it appears below.
The quick brown fox jumps over the lazy dog.
Press Enter when you are ready to begin... <user presses Enter here>
Theq uick brown fix jumcs over the laay dog.
Your time: 5 seconds
Good-bye.
Notice that you do not need to count typos. It doesn't really matter what the user types at all.
Save your program in a file named Typing.java.
For this lab, you must submit the two in-lab exercise during your normally scheduled lab session. By Wednesday, February 3 at midninght you should submit these three files:
Do not submit .prj or .class files. Only the three files named above should be submitted.
In order to submit files, click on the following link to send mail to:
with the following Subject:
and then Attach your program files to the e-mail message. You may attach all three files in the same message, but you don't have to. You can submit your programs in separate e-mails if you wish. Do not type anything in the body of the message! You must use the filenames specified in this assignment and you must attach the files to the mail message.