Question: we used student java, cat java and maindriver java create student java , cat java and maindriver classs The goal of this lab is to

 we used student java, cat java and maindriver java create student
java , cat java and maindriver classs The goal of this lab
is to learn the followings: Get familiar with the if-else, switch-case, and
loop statements Phase 1 - Modifying the Student class Add the following
we used student java, cat java and maindriver java
create student java , cat java and maindriver classs

The goal of this lab is to learn the followings: Get familiar with the if-else, switch-case, and loop statements Phase 1 - Modifying the Student class Add the following method. degreeCompletionEffort(): - Calculate the remaining credits to complete as 128.0 - completed CreditHours. Calculate the remaining semesters to complete as 10- currentSemester Calculate the credits per future semester as remaining credits/ remaining semesters. - Display messages as follows: Condition for credits per future Message to display semester less than or equals to 10.0 You may graduate early. greater than 10.0 but less than or You are in the right phase of completing equals to 20.0 your degree greater than 200 but less than or You will have to work hard to complete the equals to 28.0 degree on time. greater than 28.0 It is nearly impossible to graduate on time. Add JavaDoc comments in the Student class based on the newly added method. 1 Phase 2 - Modifying the Cat class Modify the following methods: play() - If the energy becomes negative once decreases by 1. set it too. feedo - If the hungry becomes negative once decrease by 3, set it too Add the following methods. todayCatMood(): Display the following messages based on the cat's mood instance variable. Mood value Message Scared Happy Sad Sleepy Playful Anxious Agitated Aggressive Furious Affectionate 1 2 3 4 5 6 7 8 9 10 feedsUntilNoHunday(): Count and return the number of times you need to feed the cat (call the feed method) to make the cat's hungry go away (hungry instance variable is 0. Note: Use a loop statement gainFullEnergyAfterPlayAndSleep(): Count and return the number of times it takes to fully gain the energy after play and sleep cycles for a cat as follows: Until the energy is 10 Generate a random number between 1-10. If the random number is even call the play() method. If the random number is odd, call the sleep() method. Increase the count by 1. Note: Use a loop statement. Add or modify the JavaDoc comments in the Cat class based on the newly added/modified methods. Phase 3 - Modify the Dog class Add the following method: speedLevel(): Display the following messages based on the dog's speed instance variable. Speed Message 1 Super slow 2.3 Slow 4,5,6 Normal speed 7,8 Faster than average 9 Very fast 10 Superfast Add or modify the JavaDoc comments in the Dog class based on the newly added method. Phase 4 - Modify the Main Driver class Create an object of the Cat class in the main method using the constructor defined in BigLab03. public Cat(String name, String color). You can set the name, color to any value (no need to take user input) Create an object of the Dog class in the main method using the constructor defined in BigLab03: public Dog(String name, String color). You can set the name, color to any value (no need to take user input) Calculate the followings: Cat Win Score = (((meow Volume craftiness) / (ageFactor)) * (speed + clawFactor) where, ageFactor = Max of (absolute value of (age - 5) and 1) I/The max replaces with 1 If Cat has claws, clawFactor = 2 If Cat does not have claws, clawFactor = 0 Dog Win Score = (growlVolume * craftiness) * speed 4 3 Assume we are having a competition between the Cat and the Dog. Display the winner of the competition using the rules below: Dog is NOT a cat chaser AND Cat purrs louder than Dog Growls --> Cat Wins Dog is NOT a cat chaser AND Cat has claws AND Cat is craftier than Dog--> Cat Wins Dog is NOT a cat chaser AND Cat meows louder than Dog Barks --> Cat Wins Dog is NOT a cat chaser AND Cat is younger than 2 --> Cat Wins Dog is NOT a cat chaser and all of the above options are not true --> Dog Wins Dog Is a cat chaser AND Dog Win Score is greater than Cat Win Score (margin of error .05) --> Dog Wins Dog IS a cat chaser AND Cat Win Score is greater than Dog Win Score (margin of error .05) -> Cat Wins Dog Is a cat chaser AND Dog Win Score is the same as the Cat Win Score (margin of error .05) --> TIE Modify the above to demonstrate the competitions between 1000 Cats and 1000 Dogs with the same name and color. Calculate and display the winning percentage of the Cats and the Dogs

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!