Using the class Pet from Listing 6.1, write a program to read data for five pets and display the following data: name of smallest pet, name of largest pet, name of oldest pet, name of youngest pet, average weight of the five pets, and average age of the five pets.
This project is a little more challenging if it is written to find and display all the names if more than one pet weighs the most or least, or is the oldest or youngest, which is how the solution in this manual was written.
See the code in OutputFormat.java, PetRecord.java, and PetStatistics.java.
You might also like to view...
FFTH stands for ________
Fill in the blank(s) with correct word
Which statement is false?
a. When a method call is made, the called method must know how to return to its caller, so the return address is pushed onto the program execution stack. b. Stacks support recursive method calls in the same manner as conventional, nonrecursive method calls. c. The program execution stack contains the space created for a method's global variables on each invocation of that method during a program's execution. d. When a method returns to its caller, the memory for that method's local variables is popped off the stack and those variables are no longer known to the program.