A good answer might be:The complete program, suitable for Copy-Paste-Save-and-Run, is seen below: | |
Complete ProgramHere is the complete program. The calculateMPG() method returns a double value to the caller. Since it returns a value, there must be a return statement within its body that returns a value of the correct type. In the complete program, the calculateMPG() method uses the instance variables of its object to calculate miles per gallon.
| |
QUESTION 11:
|