Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

to encourage a drive for change by developing new ideas;

Answered: 1 week ago

Question

4 What are the alternatives to the competences approach?

Answered: 1 week ago