- Information
- AI Chat
Was this document helpful?
J1.S.P0051 assignments
Course: Object-Oriented Programming (PRO 192)
999+ Documents
Students shared 1172 documents in this course
University: Trường Đại học FPT
Was this document helpful?
LAB211 Assignment
Type: Short Assignment
Code: ab41c9d883b3f6e844
97bd8d477124bc.doc
x
LOC: 61
Slot(s): 1
Title
Develop a computer program.
Background
N/A
Program Specifications
-Write a computer program including the functionality to add, subtract, multiply, divide, and calculate exponents
and BMI index.
-The calculation function will calculate and store results into the temporary memory when input each Operator
and only stop when the user inputs the operator as “=”.
-BMI is calculated below:
BMI = (body weight)/ (height x height).
-Body weight: kg.
-height x height: m.
-Display the notification about the status of the user’s body:
o Under-standard: BMI is less than 19
o Standard: BMI is between 19-25
o Overweight: BMI is between 25-30
o Fat - should lose weight : BMI is between 30-40
o Very fat - should lose weight immediately: BMI is over 40
Function details:
Function 1: Display a menu and ask users to select an option.
oUser runs the program. The program prompts user to select an option.
oUser selects an option, perform Function 2.
Function 2: Perform function based on the selected option.
oOption 1: Normal calculator
a. Require to input task information including “number, operator”.
b. Check the valid data with the following conditions:
i. Number field must be numeric data