5. In a new Java file, create the Monkey class, using the specification document as a guide. The Monkey class must do the following: o Inherit from the RescueAnimal class. o Implement all attributes to meet the specifications. o Include a constructor. You may use a default constructor. To score "exemplary" on this criterion, you must include the more detailed constructor that takes all values for the attributes and sets them. Refer to the constructor in the Dog class for an example. o Include accessors and mutators for all implemented attributes. 6. In the Driver.java class, modify the main method. In main(), you must create a menu loop that does the following: • Displays the menu by calling the displayMenu method. This method is in the Driver.java class. o Prompts the user for input o Takes the appropriate action based on the value that the user entered IMPORTANT: You do not need to complete all of the methods included in the menu for this milestone. Simple placeholder print statements for these methods have been included in the starter code so that you can test your menu functionality.
5. In a new Java file, create the Monkey class, using the specification document as a guide. The Monkey class must do the following: o Inherit from the RescueAnimal class. o Implement all attributes to meet the specifications. o Include a constructor. You may use a default constructor. To score "exemplary" on this criterion, you must include the more detailed constructor that takes all values for the attributes and sets them. Refer to the constructor in the Dog class for an example. o Include accessors and mutators for all implemented attributes. 6. In the Driver.java class, modify the main method. In main(), you must create a menu loop that does the following: • Displays the menu by calling the displayMenu method. This method is in the Driver.java class. o Prompts the user for input o Takes the appropriate action based on the value that the user entered IMPORTANT: You do not need to complete all of the methods included in the menu for this milestone. Simple placeholder print statements for these methods have been included in the starter code so that you can test your menu functionality.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
I need help with my assignment in my Java programing class. I have already created the "Monkey" class (#5) but need help in creating a loop (#6) as I struggle with loops since they are not clicking. Please see the picture for the criteria on the loop. Attached is also a picture of the first page of the driver class.
![10 import java.util.ArrayList;
2 import java.util.Scanner;
3
4 public class Driver {
private static ArrayList<Dog> dogList = new ArrayList<Dog> ();
// Instance variables (if needed)
8
//Monkey Array
private static ArrayList<Monkey> monkeyList = new ArrayList<Monkey> ();
10
11e
public static void main (String [] args) {
12
13
14
initializeDogList ();
initializeMonkeyList ();
15
16
// Add a loop that displays the menu, accepts the users input
// and takes the appropriate action.
// For the project submission you must also include input validation
// and appropriate feedback to the user.
// Hint: create a Scanner and pass it to the necessary
// methods
// Hint: Menu options 4, 5, and 6 should all connect to the printAnimals () method.
17
18
19
20
21
22
23
24
25
26
27
// This method prints the menu options
280
29
30
public static void displayMenu () {
System.out.println ("\n\n");
System.out.println ("\t\t\t\tRescue Animal System Menu");
System.out.println ("[1] Intake a new dog");
31
32
33
System.out.println (" [2] Intake a new monkey");
System.out.println ("[3] Reserve an animal");
System.out.println ("[4] Print a list of all dogs");
System.out.println ("[5] Print a list of all monkeys") ;
System.out.println ("[6] Print a list of all animals that are not reserved");
System.out.println ("[a] Quit application");
em.out.println ():
System.out.println ("Enter a menu selection");
34
35
36
37
38
Sys
39
40
41
42](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd9fa295a-90dd-4ec6-950d-22c80fce920e%2Ff2dad850-a4ed-4bc3-828d-ca7eb418d991%2Fyj84v7_processed.png&w=3840&q=75)
Transcribed Image Text:10 import java.util.ArrayList;
2 import java.util.Scanner;
3
4 public class Driver {
private static ArrayList<Dog> dogList = new ArrayList<Dog> ();
// Instance variables (if needed)
8
//Monkey Array
private static ArrayList<Monkey> monkeyList = new ArrayList<Monkey> ();
10
11e
public static void main (String [] args) {
12
13
14
initializeDogList ();
initializeMonkeyList ();
15
16
// Add a loop that displays the menu, accepts the users input
// and takes the appropriate action.
// For the project submission you must also include input validation
// and appropriate feedback to the user.
// Hint: create a Scanner and pass it to the necessary
// methods
// Hint: Menu options 4, 5, and 6 should all connect to the printAnimals () method.
17
18
19
20
21
22
23
24
25
26
27
// This method prints the menu options
280
29
30
public static void displayMenu () {
System.out.println ("\n\n");
System.out.println ("\t\t\t\tRescue Animal System Menu");
System.out.println ("[1] Intake a new dog");
31
32
33
System.out.println (" [2] Intake a new monkey");
System.out.println ("[3] Reserve an animal");
System.out.println ("[4] Print a list of all dogs");
System.out.println ("[5] Print a list of all monkeys") ;
System.out.println ("[6] Print a list of all animals that are not reserved");
System.out.println ("[a] Quit application");
em.out.println ():
System.out.println ("Enter a menu selection");
34
35
36
37
38
Sys
39
40
41
42

Transcribed Image Text:5. In a new Java file, create the Monkey class, using the specification document as a guide. The Monkey class must do the following:
o Inherit from the RescueAnimal class.
o Implement all attributes to meet the specifications.
o Include a constructor. You may use a default constructor. To score "exemplary" on this criterion, you must include the more detailed
constructor that takes all values for the attributes and sets them. Refer to the constructor in the Dog class for an example.
o Include accessors and mutators for all implemented attributes.
6. In the Driver.java class, modify the main method. In main(), you must create a menu loop that does the following:
• Displays the menu by calling the displayMenu method. This method is in the Driver.java class.
o Prompts the user for input
• Takes the appropriate action based on the value that the user entered
IMPORTANT: You do not need to complete all of the methods included in the menu for this milestone. Simple placeholder print statements
for these methods have been included in the starter code so that you can test your menu functionality.
Expert Solution

Step 1
the answer is given below:-
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 10 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY