Examples of calculateBmi()


Examples of net.sf.laja.example.person.behaviour.Person.calculateBmi()

     *    and then we let 'Person' delegate to this object in the method calculateBmi().
     */
    public static void main(String... args) {
        Person person = Person.givenName("Joakim").surname("Tengstrand").weightInKilograms(82).height(Height.heightInCentimeters(186)).asPerson();
        System.out.println(person);
        System.out.println("Body Mass Index: " + person.calculateBmi());
        System.out.println("Has normal weight?: " + person.hasNormalWeight());
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.