6. In the Driver.java class, modify the main method. In main(), you must create a menu loop that does the following: o 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
6. In the Driver.java class, modify the main method. In main(), you must create a menu loop that does the following: o 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
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
I need help in my intro to

Transcribed Image Text: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
![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%2F18f2868c-689d-4f14-8462-9c3284c9506e%2Fde2xjq_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
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education