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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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