Question: java thank you! 2 separate files thanks!!: 1.Verb.java 2.VerbTester.java (provided) Use the following file: VerbTester.java public class VerbTester { public static void main(String[] args) {
java thank you!
2 separate files thanks!!:
1.Verb.java
2.VerbTester.java (provided)

Use the following file:
VerbTester.java
public class VerbTester { public static void main(String[] args) { Verb word = new Verb("mop"); System.out.println(word.getPast()); System.out.println("Expected: mopped"); word = new Verb("cry"); System.out.println(word.getPast()); System.out.println("Expected: cried"); word = new Verb("run"); System.out.println(word.getPast()); System.out.println("Expected: ran"); word = new Verb("walk"); System.out.println(word.getPast()); System.out.println("Expected: walked"); word = new Verb("ride"); System.out.println(word.getPast()); System.out.println("Expected: rode"); word = new Verb("see"); System.out.println(word.getPast()); System.out.println("Expected: saw"); word = new Verb("ski"); System.out.println(word.getPast()); System.out.println("Expected: skied"); } }Make a class Verb to represent a verb in English Define a constructor that takes a String as as a parameter Provide the methods: getVerb) returns the actual verb getPast ) - returns the past tense of the verb Simplified and imprecise rules for forming past tense of verbs While most verbs add "ed" to form the past tense, there are irregular verbs and other special cases rregular verbs Verb Past tense run ride see ran rode saw Special cases If the verb ends in a "y", change the "y" to "i" and add "ed". If the verb ends in an "e", just add "d" rather than "ed" If the verb is three characters long and ends in a consonant, double the consonant and add "ed" o past tense of try is tried o past tense of hope is hoped o past tense of hop is hopped In all other cases, add "ed" Note: only use one return statement in getPast0 Provide Javadoc for the class, the methods and the constructor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
