Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP. JAVA PROGRAM. THANKS Create a program that allows users to enter a sentence in either past or present or tense and get back

PLEASE HELP. JAVA PROGRAM. THANKSimage text in transcribed

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: I eat today They should get back: I ate yesterday Make sure ALL the following inputs are accounted for (meaning if any of these inputs are used, the program is expected to work correctly) l eat today. -> ate 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 yesterday. Present tense is: She eats today Please enter a sentence or q to quit I walk today Past tense is: I walked yesterday Please enter a sentence or q to quit: BYE

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

What is the principle of thermodynamics? Explain with examples

Answered: 1 week ago