
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!

Computer Science 121 Assignment 2 Due: October 4, 1999 Create a Java application that has two classes, one containing the main method that starts the action and the other that describes a person. The data for this class should be a person's name, weight in pounds and height in feet and inches. Assign reasonable values for these in the constructor for the class. A second method should calculate and display the person's body mass index. To compute this, multiply the person's weight in pounds by 705. Then divide this result by the person's height in inches squared. For example, if the person weighs 120 pounds and is 5 feet 2 inches tall ( inches), his or her body mass index is (120 * 705) / (62 * 62) or 22. The main method should declare a person and then call the appropriate method to display the person's body mass index.