Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Directions Review the Grazioso Salvare Specification Document in the Supporting Materials section to understand your client s requirements. As you read, pay close attention to

Directions
Review the Grazioso Salvare Specification Document in the Supporting Materials section to understand your clients requirements. As you read, pay close attention to the attributes and methods that you must implement into the program.
Open the Virtual Lab by clicking the link in the Virtual Lab Access module. Then open the Eclipse IDE. Follow the Uploading Files to Eclipse tutorial to help upload the Grazioso.zip folder to Eclipse. Both resources are linked in the Supporting Materials section below. The Grazioso.zip folder contains three starter code files: Driver.java, RescueAnimal.java, and Dog.java. Once you have uploaded the files, compile the code. Although the program is not complete, it should compile without error.
Read through the code for each class that you have been given to understand why the functionality of the overall application has been broken down into multiple classes. Reading through the code will also help you understand what code has been created and what code must be modified or created to meet the requirements.
You have been asked to demonstrate industry standard best practices in all the code that you create to ensure clarity, consistency, and efficiency among all software developers working on the program. Include the following items in your code for each class:
In-line comments that denote your changes and briefly describe the functionality of each method or element of the class
Commenting code is crucial for several reasons. Commenting code provides human-readable explanations of the codes functionality. The comments make it easier for other developers or even the original coder to understand and maintain the code after some time. Clear and concise comments act as documentation. Comments offer insights into the logic, purpose, and usage of different sections of the code. Comments become especially valuable in collaborative projects or when handing over code to other developers. Comments can also help identify potential issues, edge cases, or important considerations that help communication between developers. Well-documented code accelerates the development process and contributes to overall maintainability, which reduces the likelihood of errors and makes code more adaptable to changes and improvements.
Appropriate variable and method naming conventions
This can be a difficult task. Avoid giving your variables and methods overly generic names like number or method1. Instead, use succinct, meaningful names.
In a new Java file, create the Monkey class (click File then New and then Class) and populate the new class with code using the specification document as a guide. The Monkey class must perform the following functions:
Inherit from the RescueAnimal class.
Implement all attributes with proper data types to meet the specifications.
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 into the constructor as parameters and assigns them to the class attributes. Refer to the constructor in the Dog class for an example.
Include accessors and mutators for all implemented attributes.
In the Driver.java class, modify the main method. In main(), you must create a menu loop that does the following criteria:
Displays the menu by calling the displayMenu method. This method is in the Driver.java class.
Prompts the user for input using a scanner object.
Takes the appropriate action based on the value that the user entered.
Important: You do not need to complete all 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.
Next, you must create a monkey ArrayList in the Driver.java class. Refer to the dog ArrayList, which is included right before main(), as an example. Creating this ArrayList is necessary for the intakeNewMonkey() method, which you will implement in the next step. Though it is not required, it may be helpful to pre-populate your ArrayList with a few test monkey objects in the initializeMonkeyList() method.
Finally, implement the intakeNewMonkey() method in the Driver.java class. Your completed method should perform the following actions:
Prompt the user for input.
Set data for all attributes based on user input.
Add the newly instantiated monkey to an ArrayList.
Tips: Refer to the accessors and mutators in your Monkey and RescueAnimal classes as you create this method. You should also use the nextLine method of the scanner to receive the users input. Refer to Section 1.15 in zyBooks for a refresher on how to use this method.
What to Submit
Use the Downloading Files From Eclipse document in the Supporting Materials section to help you download your completed class files. Make certain you submit your milestone even if you didnt complete every part or if your program has compiling errors.

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions