Uploaded by Amazing 10 Memes

TM105 TMA Spring 2020-2021

advertisement
Faculty of Computer Studies (FCS)
TM105/M105: Introduction to Programming
Tutor Marked Assignment (TMA) – Spring 2020-2021 Semester
Cut-Off Date: 12nd May 2021
Total Marks: 20
This TMA deals with a mathematical project. You must submit the source file well documented in a Java
project. Also, you must submit a single word file containing:
- A copy and paste of all java code.
- Snapshots of the program runs.
- If your code does not completely work, attach some description to explain the status of the code
and the runs.
You have two submission links on your LMS page:
• A submission link to upload a zipped folder of your Java project.
• A submission link to upload the word file.
IMPORTANT WARNINGS
YOUR TMA WILL NOT BE MARKED IF NOT ALL THE REQUIRED FILES ARE SUBMITTED ON BOTH
SUBMISSION LINKS.
ANY ANSWERS OUT OF THE TMA MATERIAL (MEETINGS 1, 2, 3, 4) WILL NOT BE CONSIDERED.
STUDENT WILL BE PENALIZED IF HE/SHE GET EXTERNAL SUPPORT.
PLAGIARISM WARNING
As per AOU rules and regulations, all students are required to submit their own TMA work and avoid
plagiarism. The AOU has implemented sophisticated techniques for plagiarism detection. You must
provide all references in case you use and quote another person's work in your TMA. You will be penalized
for any act of plagiarism as per the AOU's rules and regulations.
Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA work):
I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized
any other person's work. I have provided all references of information that I have used and quoted in my
TMA work.
Name of Student:
Signature:
Date:
OVERVIEW
Body mass index (BMI) is a value derived from the mass (weight) and height of a person. The BMI
is defined as the body mass divided by the square of the body height, and is expressed in units of kg/m2,
resulting from mass in kilograms and height in meters. The BMI may be determined using a table or chart
which displays BMI as a function of mass and height using contour lines or colors for different BMI
categories, and which may use other units of measurement (converted to metric units for the
calculation). The BMI is a convenient way for classifying persons in to 4 categories based the BMI value
as shown the following table:
BMI value
Less than 18.5
18.5 to less than 25
25 to less than 30
30 or higher
Category
Underweight
Normal
Overweight
Obese
A national study in some country to analyze the BMI of the people in the country is considered. In this
study, a set of cities is selected in the study and randomly specific number of persons are selected to
check the BMI category of each one.
Implement a java project to help in the study analysis with the following steps:
•
•
•
•
•
Read from the user the number of cities (minimum 6 cities.)
For each city: city name and the number of persons (minimum 10 persons) are entered.
For each person in a city: mass and height should be entered, BMI and BMI category have to be
computed and printed.
For each city, the number of persons and percent ratio in each BMI category should be computed
and printed.
Finally, the program should print a summary report with the following details:
o Number of cities.
o Total number of persons and percent ratio of persons in each BMI category in all cities.
o The name of the best city which has the maximum percent of persons in normal weight
BMI category and these people’s percent ratio.
o The name of the worst city which has the maximum percent of persons in obese BMI
category and these people’s percent ratio.
o The name of the city which has the minimum percent of persons in underweight BMI
category and these people’s percent ratio.
----------------------------------------------------------------------------------------------------------------------------------------------------End of TMA,
Download