Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part (1) Define a dass with the following specifications: The class rame is HeightweightRatio with three private data members gender (String us male or female

image text in transcribed
Part (1) Define a dass with the following specifications: The class rame is HeightweightRatio with three private data members gender (String us male or female in any letter casel, height (double in cm), and weight double in b. Write a constructor that accepts pender, height and weight as input parameters to initializes the private data members Provide an act) method and a mutator (set) method for the height data member 4. Define a public method called check Rate which check the height weight ratio and return the decisions Boole. The height weight ratio decision is checked as the following Male: Acceptable when weight is between (height-105) and (height:95%; otherwise, is not receptable Female: Acceptable when weight is between high-100) and height-90% otherwise, is not acceptable Define a puble method called show Details to show all details in the following sample: Genderis Make Height is 170 CM Weight i 74 KG Part (2) Write a Java application to do the following a. Asks the user to input his/her gender, height and weight. b. Create an object called personi from the class HeightweightRatio and initialize its private members according to the input data, c. Display the details of person object d. Display the message: "Acceptable High Weight Ratio" OR "Not Acceptable High Weight Ratios based on the check Ratio) decision Sample InputOutput Input Gender, Height and Weight Male 17074 Gender Male Height is 170 CM Weight is 14KO Acceptable Hight/Weight Ratio Note: Your answer should follow the given sample lopet/output

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Were the right people involved in the decision-making process?

Answered: 1 week ago

Question

Were they made on a timely basis?

Answered: 1 week ago