subject

Next, you will implement the reserveAnimal() method. Your completed method should do the following: Prompt the user for input. The user should enter their desired animal type and country. o If there is an available animal which meets the user's input criteria, the method should access an animal object from an ArrayList. If there are multiple animals that meet these criteria, the program should access the first animal in the ArrayList. The method should also update the "reserved" attribute of the accessed animal. o If there is not an available animal which meets the user's input criteria, the method should output feedback to the user letting them know that no animals of that type and location are available. 6. Finally, you have been asked to implement a printAnimals() method that provides easy-to-read output displaying the details of objects in an ArrayList. o To demonstrate this criterion in a "proficient" way, your implemented method must successfully print the ArrayList of dogs or the ArrayList of monkeys. o To demonstrate this criterion in an "exemplary" way, your implemented method must successfully print a list of all animals that are "in service" and "available". import java. util. ArrayList; import java. util. Scanner; public class Monkey extends RescueAnimal{ private String species, tailLength, height, bodyLength; public Monkey (String name, String species, String tailLength, String height, String bodyLength, String gender, String age, String weight, String acquisitionDate, String acquisitionCountry, String trainingStatus, boolean reserved, String in ServiceCountry) { setName(name); setSpecies (species); setTailLength(tailLength); setHeight(height); setBodyLength(bodyLength); setGender(gender); setAge(age); setWeight(weight); setAcquisitionDate(acquisitionDate) ; setAcquisition Location(acquisitionCountry); setTrainingStatus (trainingStatus); setReserved(reserved); setInServiceCountry(inServiceCountr y); } //Accessor and Mutator methods public String getSpecies() { return species; } public void setSpecies (String monkey Species) { species = monkeySpecies; } public String getTailLength() { return tailLength; } public void setTailLength(String monkeyTailLength) { tailLength = monkeyTailLength; } public String getHeight() { return height; } public void setHeight(String monkeyHeight) { height = monkeyHeight; } public String getBodyLength() { return bodyLength; } public void setBodyLength(String monkeyBodyLength) { bodyLength = monkeyBodyLength; } } public class Dog extends RescueAnimal { // Instance variable private String breed; // Constructor public Dog(String name, String breed, String gender, String age, String weight, String acquisitionDate, String acquisitionCountry, String trainingstatus, boolean reserved, String inServiceCountry) { setName(name); setBreed (breed); setGender(gender); setAge(age); setWeight(weight); setAcquisitionDate(acquisitionDate) ; setAcquisitionLocation(acquisitionC ountry); setTrainingstatus (trainingstatus); setReserved (reserved); setInServiceCountry(inServiceCountr y); } // Accessor Method public String getBreed() { return breed; } // Mutator Method public void setBreed(String dogBreed) { breed = dogBreed; } }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:30
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
question
Computers and Technology, 24.06.2019 08:20
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
question
Computers and Technology, 24.06.2019 12:30
Do you think media is stereotype ? and why?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
You know the right answer?
Next, you will implement the reserveAnimal() method. Your completed method should do the following:...
Questions
question
Mathematics, 23.09.2019 23:00
question
Mathematics, 23.09.2019 23:00
question
Mathematics, 23.09.2019 23:00
Questions on the website: 13722367