Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help Part (1) Define a dass with the following specifications The class name is Heightweightatio with three private data members gender (String a male or
help
Part (1) Define a dass with the following specifications The class name is Heightweightatio with three private data members gender (String a male or female in any lotter case height (double in cm), and weight double in Write a constructor that accepts gender, height and weight as input parameters to initializes the private data members Provide an ac method and a motor(t) mehed for the height duta member 4. Define a public method called check at which check the lightweight ratio and returns the decision as Hoolean The height weight to decision is checked as the following Male: Acceptable when weight is between theight105and height 95% otherwise, is not acceptable Female Acceptable when weight is botwean (heigh-700) and high-90cherwise, is not acceptable . Delfines puble method called show Details to show all details and the following sample Genderis Make Height OCM Waiti 74 KG Part 2) Write a Java application to do the following 2. Asks the user to input his/her gender, height and weight Create an object called person from the class HeightweightRatio and initialize its private members according to the input data. Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started