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, 22.06.2019 01:50
Click on this link toopens a new window. bring up a flowchart in a new browser window. based on this flowchart, would a d-link 3347 gateway with an xbox 360 multiplayer problem be in scope or out of scope
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Click the "draw structure" button to activate the drawing utility. draw two diastereomers of (1z,4r)−1,4−dimethylcyclodecene and name them, including (e)/(z) and (r)/(s) notation. part 1 out of 4 draw the diastereomer containing a chiral center with s configuration here. window open
Answers: 1
You know the right answer?
Next, you will implement the reserveAnimal() method. Your completed method should do the following:...
Questions
question
English, 18.12.2020 07:30
question
Biology, 18.12.2020 07:30
question
Mathematics, 18.12.2020 07:30
question
Computers and Technology, 18.12.2020 07:30
Questions on the website: 13722363