Class : HumanBeing Main Class: Index private public setHeight() 1. call the Human height being Class. public getHeight() 2. set height, weight and bmi private public setWeight() values using the presribed methods. weight public getWeight() 3. get and print height, weight and bmi values using private public setBmi() bmi the prescribed nublic getBmi0

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Build a program using encapsulation base on the image below.

 

Class : HumanBeing
Main Class: Index
private
public
setHeight()
1. call the Human
height
being Class.
public
getHeight()
2. set height,
weight and bmi
values using the
presribed methods.
private
public
setWeight()
weight
public
getWeight()
3. get and print
height, weight and
bmi values using
private
public
setBmi()
bmi
the prescribed
methods.
public
getBmi()
Transcribed Image Text:Class : HumanBeing Main Class: Index private public setHeight() 1. call the Human height being Class. public getHeight() 2. set height, weight and bmi values using the presribed methods. private public setWeight() weight public getWeight() 3. get and print height, weight and bmi values using private public setBmi() bmi the prescribed methods. public getBmi()
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT