Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

Introduce yourself with an elevator speech

Answered: 1 week ago

Question

1. PricewaterhouseCoopers

Answered: 1 week ago

Question

3. SCC Soft Computer

Answered: 1 week ago