CPT111 Principles of Programming Assignment

Assignment Help C/C++ Programming
Reference no: EM132410302

CPT111 Principles of Programming Assignment - University of Science, Malaysia

PROBLEM STATEMENTS - "Malaysia is Asia's fattest country with approximately half of the population overweight or obese.

Obesity means having too much body fat. It is different from being overweight i.e. weighing too much. Both terms mean that a person's weight is greater than that considered healthy for his or her height...

Obesity can lead to serious and potentially life-threatening conditions like cardiovascular disease, diabetes, stroke, gall stones, and some cancers like breast, uterine and colon cancer.

It affects quality of life and causes physical changes like breathlessness, snoring, sleep apnea, tiredness, difficulty with physical activity and arthritis. It can also lead to psychological conditions like low self-esteem and depression."

In accordance with the news, USM make an effort to promote a healthy lifestyle by keeping track of the Body Mass Index (BMI) of each staff. As a programmer in a software solution company, you are appointed to develop an application called Let's Get Fit (LGF) which calculate the BMI for every USM staff. Based on the calculated BMI, you can identify body weight category of a person as shown in Table 1.

Table 1: Weight Categories using BMI Scale

BMI

Weight category

< 20

Underweight

20 <= BMI < 25

Normal weight

25 <= BMI < 30

Overweight

>= 30

Obese

The program should read data from a text file which contain the following USM's staff information:

Name

Staff ID

Gender

Age

Weight (kg)

Height (cm)

These data are read from a text file and must be stored in appropriate arrays which will then be used to compute BMI, Basal Metabolic Rate (BMR) and Resting Metabolic Rate (RMR) for each person using Table 2 attached. This information is then written into an output file after new information is added.

As a programmer, you should use your own creativity to provide meaningful and interesting information to be displayed on the screen. You should use menu in order to have a full control of the program execution.

The program should be able to make simple search of a specific criterion, e.g: search for BMI, BMR and RMR of individual based on staff ID, gender and age. It could also able to search for combinational criteria, e.g.: search for all staff with BMI less than 25 and also more than 35 years old and etc.. Apart from these, the program should be able to produce statistical distribution based on Table 1, e.g., display the number of overweight women between 30 - 50 years old. In addition, you may want to do some processing on the available data in order for a person to achieve certain target, e.g. How many calories consumption one must take in order to lose 2 kg in 1 month without starving themselves?

The program must at least able to do the following:

I. Read data from input file specified by user

II. Read data from user (add new staff information)

III. Continue the program until the user ask to stop

IV. Provide a menu for user

V. Search for specific information

VI. Search for combinational information

VII. Modify the selective information (age and weight)

VIII. Automatically recalculate the value of BMI, BMR and RMR upon changes of age and weight of any individual

IX. Present minimal statistical information

X. Produce an output file

Your design should fulfil the following requirements:

General requirements:

I. Input validation

II. Interactive menu

III. Good Interface Design (i.e. Presentable manner and easy to understand)

IV. Meaningful comments in the source codes

Specific requirements:

I. Your program should demonstrate the use of user defined functions and passing parameters by value, arrays and reference

II. Read data only once from a text file and store them into appropriate array(s)

III. Data must be retrieved and processed from array(s)

The program must NOT:

I. Use pointer of array

II. Use build in library <vector>

III. Open the same file more than once and close it more than once. Use appropriate file stream and access flags.

IV. Allow the program terminated without the consent of the user.

V. Use global variables.

Attachment:- Principles of Programming Assignment File.rar

Reference no: EM132410302

Questions Cloud

What is the regression model-equation : In this model, which variable do we presume is the "dependent" variable and which is "independent"...and why?
What are the null and alternate hypotheses required : a. Why does she smile EVEN BEFORE she has done any computations? b. Should the dietician use t or z to perform this test? Why so?
Should the researcher use t or z to compute this interval : Respond to each of the following questions being sure to show all of your work in the space(s) provided.
Describe the centers of distribution in terms : Based on these data, is it better to describe the centers of distribution in terms of the mean or the median? Explain.
CPT111 Principles of Programming Assignment : CPT111 Principles of Programming Assignment Help and Solution - University of Science, Malaysia. Promote a healthy lifestyle by keeping track of Body Mass Index
Average number of flights that experience : A transportation analyst is told that the average number of flights that experience delays at a busy airport between 5 and 10 PM is equal to 20.
Students in the sample took : Suppose we want to find out (or test) if the percentage of students at LWIT that take a 100-level math class is more than 25%.
Are the groups independent : Are the groups independent? Examine the means and SDs for each of the groups.
Bayes theorem problem-oil fields : Suppose you work for an oil company and you're looking at some land which might have oil in it.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Compute the area of a right angled triangle

BMS 201 - Design this program using an algorithm of your choice, draw the flow chart and convert the flowchart into a c++ program

  Write c program which has parent process and child process

Write a C program that has a parent process, a child process, and a grandchild process. The parent process should print its id and the square or 5.

  If a class is derived protected

If a class is derived protected from a base class, explain how this affects the inheritance of all public, protected, and private members of the base class by the derived class.

  Computes the area of a rectangle

Create an object oriented application with C# that computes the area of a rectangle, and the area and the volume of a cuboid.

  Develop clear and correct flowchart of the project

Prepare a report on the finished project along with program code and the program flow chart.A) Based on the information above (Equation, range and step of x), develop a C++ program - Develop the complete C++ program based on the flowchart.

  Write a sequence of c statements to configure port

Write a sequence of C statements to configure port D pins PD03~PD04 to alternate function AF3 and configure PD08~PD09 pins for alternate function AF6

  Write a program that calculates an employees wage for a

write a program that calculates an employees wage for a week. an employees wage is calculated as followsi if the number

  Implementation of the black-scholes

Sys-Computation Finance ISyE 6767 - Consider an option portfolio consisting of a long position in the call option in problem 1 with τ = 0.5 and a short position in a call option with a different time to expiration

  Create a program that outputs the result of the formula

Create a program that uses the same formula above to output the result; this time, however, prompt the user for the values a, b, x, and y. Use appropriate variable names and naming conventions.

  Define a class for rational numbers

Define a class for rational numbers. A rational number is a number that can be represented as the quotient of two integers. For example, 1/2, 3/4, 64/2, and so forth are all rational numbers.

  Define the relationship between programming lang and app

Compare and contrast object-oriented technology and structured programming so that the managers of the organization can make the best decision for their business.

  Evaluate the mathematical constant of p

Write a C++ program to evaluate the mathematical constant of PI - Guess a random number between 0.00 and 1.00 and assign this to x.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd