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, 21.06.2019 18:00
Jenna updated her status on a social network regarding her upcoming vacation. what information should jenna not provide when updating her status on a social networking site? a. her favorite quote b. her likes in popular culture c. her routine d. her opinions on social issues res
Answers: 1
question
Computers and Technology, 22.06.2019 02:20
The reset circuit used on the four 3-bit counters analyzed in this activity reset the counts to zero (000). it makes sense for the up-counters to start at zero (000), but the down-counters should start at seven (111). what would you need to change so that the 3-bit binary down counter with j/k flip-flops you just created would reset to seven (111)?
Answers: 1
question
Computers and Technology, 22.06.2019 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
You know the right answer?
Next, you will implement the reserveAnimal() method. Your completed method should do the following:...
Questions