Question: Problem 3-Write a program. Submit a file called: ChangeTense.java Create a program that allows users to enter a sentence in either past or present or

 Problem 3-Write a program. Submit a file called: ChangeTense.java Create a
program that allows users to enter a sentence in either past or

Problem 3-Write a program. Submit a file called: ChangeTense.java Create a program that allows users to enter a sentence in either past or present or tense and get back the other tense. They should also include today for present tense and yesterday for past tense. For example, if a user enters: 1 eat food today They should get back: I ate food yesterday. Make sure ALL the following inputs the program is expected to work correctly): are accounted for (meaning If any of these inputs are used, I eat food today. " ate food yesterday I walk today. ->I walked yesterday. She flies today. ->She flew yesterday. He dances today. >He danced yesterday. We cook today. >We cooked yesterday. They bake today. >They baked yesterday. You speak today. >You spoke yesterday. It shakes today. > It shook yesterday. He leaves today. ->He left yesterday. Additionally, if a verb follows the standard past tense rule (meaning it ends with -ed, it should also work for this program. For example, the verb brush in past tense is brushed and so if someone enters a sentence using this word, the program should work correctly even though it is not included in the list above. A verb like fall however does not end in -ed (the past tense would be fell) and so does not need to be accounted for in this program. Example run; Please enter a sentence or q to quit: She ate food yesterday Present tense is: She eats food today. Please enter a sentence or q to quit I walk today Past tense is: I walked yesterday Please ehter a sentence or g to quit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!