Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 [HealthRisk class) Draw a UML class diagram and create a class named of HealthRisk. The class contains: . A string data field named name
1 [HealthRisk class) Draw a UML class diagram and create a class named of HealthRisk. The class contains: . A string data field named name that specify the person name. The default value is null for name A double data field named waistSize that secify the size of waist. The default value is 50 for waistSize. . . A char data field named gender that specify the gender. The default value is F for gender. A no-arg constructor that creates a default health risk. A constructor that creates a health risk with the specified name, waistSize and gender. . . A toString() method that returns "name's (gender) waist size is waistSize, so the health status is healthStatus" (based on the table below) . e.g. if the gender is F, the method returns the name, gender, waist size and health status in one combine string "Sarahs (F) waist size is 70, so the health status is Low risk" Gender (F- Female, M-Male) waistSize healthstatus 85
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