Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project C: Patient Class Report This program will create an array of 100 Patient objects and it will read data from an input file (patient.txt)

Project C: Patient Class Report

This program will create an array of 100 Patient objects and it will read data from an input file (patient.txt) into this array. Then it will display on the screen the following:

  1. The names of the underweight patients.

  2. The names of the overweight patients.

  3. The names of the obese patients.

Finally, it writes to another file (patientReport.txt) a table as shown below:

Weight Status Report ==================== === ====== ====== ============= Name Age Height Weight Status ==================== === ====== ====== ============= Jane North 25 66 120 Normal Tim South 64 72 251 Obese . . . ==================== === ====== ====== ============= Number of patients: 5 

Assume that a name has at most 20 characters (for formatting). Write several small functions (stand-alone functions). Each function should solve a specific part of the problem.

On each line in the input file there are four items: age, height, weight, and name. Test your program using the following data (input file: patient.txt)

25 66 120 Jane North 64 72 251 Tim South 52 69 175 Linda East 31 71 122 Paul West 42 65 130 Mary Jane Doe 19 71 150 Victor Smith 22 67 135 Mary Johnson 39 73 229 Tom Baker 
26 68 133 Diana Newman 54 70 215 William Peterson 28 68 143 Jim Gaddis 42 67 115 Laura King 33 71 162 Ann McDonald 52 75 270 Peter Pan 29 70 144 George Paul Lucas 23 66 135 Monica T. Potter 69 72 254 Andrew Davis 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

4. Give partial credit for partially correct answers.

Answered: 1 week ago