

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Review for Midterm
Questions 8, 9, and 10. Program with parts to write. You are to fill in the code in the three methods in the Panda class that are empty. The question will not be the same as the one below, but it will be similar. package zoo; // An application that calculates a panda’s body mass index. public class ZooKeeper { public static void main(String[] args) { Panda panda = new Panda (); panda.getData (); panda.calculateBMI (); panda.displayData (); } // main } // ZooKeeper package zoo; import java.util.Scanner; public class Panda { private String name; private double weight, height, bmi; Scanner scan = new Scanner (System.in); public void getData () { } // getData public void calculateBMI () { } // calculateBMI public void displayData () { } // displayData } // Panda