Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

While exercising, you can use a heart rate monitor to see that your heart rate stays within range suggested by the trainers and doctors. The

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

While exercising, you can use a heart rate monitor to see that your heart rate stays within range suggested by the trainers and doctors. The formula to calculate your maximum heart rate per minute is 220 (magic number()) minus your age in years. Your target heart rate is a range that's 50 to 85% of your maximum heart rate. When you supply your height (in meter) and the weight (in kg ), you can compute your BMI. The formula is Weight / (Height * Height) Let us explore the following UML diagram: Design 5 classes - An enumeration Month class consists of month constants from Jan to Dec. - A name class has a first name and a last name; i.e., are the two instance variables of this class - A Date class. Note that, other than the usual information for a calendar date i.e., private instance variables the day, the month (enum type), and the year; you have constructors, accessor and mutator methods. For the default constructor, initialize the date to 1st January 2023 . - A Height class has the same features as the Date class (constructors, accessor and mutator methods). Two private instance variables feet and inches. One important method is to convert the feet and inches and returns its equivalent value in meter. - A HealthProfile class has the same features as the Date class (constructors, accessor and mutator methods). Some important instance variables that you will see later in some UML diagram. You include also a few important methods related to the class; for example, get the maximum heart rate method, get the 2 minimum and the maximum of the targeted heart rate; compute and return the BMI; and a method to print out an object of this class. Let us look at the detail UML diagram for each of the above classes You can see in the above UML diagram, HealthProfile class Name object, Date object, Height object, the weight, and the current year as instance variables. Other methods in the class are obvious by methods' names. You construct a text file (using any text editor, for example notepad, named it as ("imput.txt") to store two persons' profiles. The sample format of this text file is: In the main method (defined in another class, for example, class Your_Name_A2), you read the information from the above text file and display the following 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

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago