0% found this document useful (0 votes)
7 views

Program Specification

Uploaded by

Zawahir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Program Specification

Uploaded by

Zawahir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Program Requirements Document

Thursday, December 26, 2024

Application/ Program name: Health app


Written by: Abdur Rafay

Purpose or problem definition:

The problem is to create a Java program,


HealthProfileApp, that allows users to manage their
health profiles.

Program Procedures:

Prompt the user to input their personal information:


first name, last name, gender, height, and weight.
Offer two options for providing the user's date of birth:
either by entering an approximate age or by entering
the exact date of birth.
Based on the user's choice, create a HealthProfile
object and initialize it with the provided information.

Calculate and display the user's health profile


information, including age, maximum heart rate,
target heart rate range, and BMI.

Algorithm/Processing/Conditions:
Inputs:
First name
Last name
Gender
Height (in inches)
Weight (in pounds)
Choice for providing date of birth
(approximate age or exact date)
Date of birth or approximate age

Page 1 of 3
Program Requirements Document
Thursday, December 26, 2024

Processes:

Prompt user for personal information.


Prompt user to choose how to provide date
of birth.
Based on choice:
If approximate age is chosen, calculate
date of birth using age.
If exact date is chosen, accept date of
birth input.
Create HealthProfile object with provided
information.
Calculate health metrics (age, maximum
heart rate, target heart rate range, BMI).
Display user's health profile information.

Outputs:
User's health profile information:
Name
Gender
Age
Height
Weight
Maximum heart rate
Target heart rate range (minimum and
maximum)
BMI

Notes & Restriction:

User inputs for height, weight, and date of birth


should be valid and within reasonable ranges.
Ensure user-friendly prompts and error handling for
incorrect inputs.

Comments:

Page 2 of 3
Program Requirements Document
Thursday, December 26, 2024

Make sure the user is guided through supplying


information using clear and straightforward prompts.
Use comments to make each program step easier to
understand.

Provide suitable error handling to allow for the


graceful handling of erroneous inputs.

Page 3 of 3

You might also like