ICS_Assignmen
Weightage : 100%
Introduction to Computer Science Part 1 (50 marks)
Construct a solution algorithm for the following problems. Your solution should contain:
Defining problem
Pseudo code algorithm
Desk check of the algorithm
o (Three test cases for each question. Two valid and one error test case)
Question 1
A clinic requires a program to calculate the body mass index (BMI) and display the BMI
value and status of a patient. Develop a program to accept the height and weight of a patient,
calculate the BMI and display BMI value and status of a patient.
BMI = weight in kg/height2
Question 2
The Meteorological service requires a program to allow the operator to enter the rainfall
level. The program keep accepting the rainfall level until a zero value is entered. The
program will keep displaying the current min, max and running average rainfall level after an
entry is made. The program terminates by the operator entering a negative value and
displaying the total number of entries made.
2
Question 3
The VO2Max score of an athletic reflects the physical fitness of an individual. It is the
maximum capacity of an individual's body to transport and use oxygen during incremental
exercise.
Kaplan Sports Club requires a Sports Recommender program to calculate the VO2Max of an
individual and display the type of sport the athletic is suitable for.
The Sports Recommender program use the following formula to calculate each athlete’s
VO2Max in mL/(kg.min).
Introduction to Computer Science Part 1 (50 marks)
Construct a solution algorithm for the following problems. Your solution should contain:
Defining problem
Pseudo code algorithm
Desk check of the algorithm
o (Three test cases for each question. Two valid and one error test case)
Question 1
A clinic requires a program to calculate the body mass index (BMI) and display the BMI
value and status of a patient. Develop a program to accept the height and weight of a patient,
calculate the BMI and display BMI value and status of a patient.
BMI = weight in kg/height2
BMI | Status |
Below 24 (inclusive) | Under weight |
Above 24 to 29 (inclusive) | Healthy |
Above 29 to 34 (inclusive) | Overweight |
Above 34 | Obese |
The Meteorological service requires a program to allow the operator to enter the rainfall
level. The program keep accepting the rainfall level until a zero value is entered. The
program will keep displaying the current min, max and running average rainfall level after an
entry is made. The program terminates by the operator entering a negative value and
displaying the total number of entries made.
2
Question 3
The VO2Max score of an athletic reflects the physical fitness of an individual. It is the
maximum capacity of an individual's body to transport and use oxygen during incremental
exercise.
Kaplan Sports Club requires a Sports Recommender program to calculate the VO2Max of an
individual and display the type of sport the athletic is suitable for.
The Sports Recommender program use the following formula to calculate each athlete’s
VO2Max in mL/(kg.min).
2020-07-09