Question
I need help in multiple codes that work together with inheritance... this is a very lengthy question, and for that, I am sorry. I put
I need help in multiple codes that work together with inheritance... this is a very lengthy question, and for that, I am sorry. I put my java code through a tester program and I am getting errors upon errors. Please, if you would make this make sense, that would be great. Mostly all the code has been given for all classes, as I will post in this text as well for the help from my side, aside from the monkey.java class which needs to be fully constructed (this is where I am having greatest difficulty). I will also supply the specifications (AT THE VERY BOTTOM OF MY QUESTION) that shows the attributes and methods that need to be implemented in text instead of a PDF file... ALSO, I will post the partial codes if the helper will comment on my question post as I cannot put more than 16000 characters in a question. THANK YOU SO MUCH FOR HELP.
In the code for each class, Dog.java, Driver.java, RescueAnimal.java, Monkey.java I would kindly appreciate the following being included:
1) In-line comments that denote changes with a brief description of the functionality of each method/element of the class
2) Appropriate variable and method naming conventions
The Monkey class must do the following:
1) Inherit from the RescueAnimal class.
2) Implement all attributes to meet the specifications.
3) 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.
4) Include accessors and mutators for all implemented attributes.
In the Driver.java class, modify the main method by creating a menu loop that does the following:
1) Displays the menu by calling the displayMenu method. This method is in the Driver.java class.
2) Prompts the user for input
3) 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.
For the next step in this, I need to create a monkey ArrayList in the Driver.java class. Referring to the dog ArrayList, which is included right before main(), as an example. Creating this ArrayList is necessary for the intakeNewMonkey() method, which will implemented 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.
and finally, implementation of the intakeNewMonkey() method in the Driver.java class. The completed method should do the following:
1) Prompt the user for input.
2) Set data for all attributes based on user input.
3) Add the newly instantiated monkey to an ArrayList.
//**friendly reminder to refer to the accessors and mutators in the Monkey and RescueAnimal classes as the method is created. Additionally, the nextLine method of the scanner to receive the users input.**//
Monkey.java Class File. should have included in-line comments and clear variable naming conventions.
Driver.java Class File. had some starter code within this file, and I was asked to modify or implement a menu loop and methods to intake dogs, intake monkeys, reserve animals, and print animals. In-line comments to describe your changes.
SPECIFICATIONS
Grazioso Salvare currently uses dogs as search and rescue animals. They expect to begin training monkeys as search and rescue animals as well. In current operations, dogs are given the status of intake before training starts. Once in training, their status can change to one of five phases: Phase I, Phase II, Phase III, Phase IV, and Phase V. When a dog graduates from training, it is given the status of in-service and is considered a Rescue Animal. If a dog does not successfully make it through training, it is given the status of farm, indicating that it will live a life of leisure on a Grazioso Salvare farm. The Animals Currently when Grazioso Salvare acquires a dog, they record the name, breed, gender, age, and weight. Grazioso Salvare also records the date and the location where they acquired the dog. Additionally, they track the training status of the dog, as described above. When a dog is inservice, they record the country where the dog is in service and whether or not the dog is reserved. Special Note on Monkeys As Grazioso Salvare explores the use of monkeys as search and rescue animals, they want their system to support monkey tracking as well as dog tracking.
They have identified the following monkey species that are eligible for training:
Capuchin
Guenon
Macaque
Marmoset
Squirrel monkey
Tamarin
There are important data elements for monkeys in addition to what they use for dogs. These include tail length, height, body length, and species. Create a Monkey Class that: Inherits from the RescueAnimal class Includes monkey-specific attributes Includes mutator and accessor methods for each attribute Complete the Driver Class. Add a menu loop that: Displays the (included) menu Prompts the user for input and validates the input Takes the appropriate action based on the input Complete a method to intake a new dog that: Prompts the user for input and validates the input Sets data for all attributes Adds the newly instantiated dog to an ArrayList Implement a method to intake a new monkey that: Prompts the user for input and validates based on monkey name and species type Sets data for all attributes Adds the newly instantiated monkey to an ArrayList Implement a method to reserve an animal that: Prompts the user for input If animal matches input criteria: Accesses animal object from ArrayList and updates the reserved attribute of the animal If no animal matches input criteria: Prints feedback to the user Implement a method to print (display) information about the animals that: Prints a list of all dogs OR all monkeys OR all animals that are in service and available (not reserved) Note: There are comments throughout the code for guidance
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started