Declare a class to represent a person( include all the necessary constructors, getters, and setters, and you may want to develop some utility functions to make processing of person objects easier such as read, print, read from file, print to file,..)
The following functions could be class member functions or stand alone
Converting inches, numeric average to letter,…
Write (one or more) bool function(s) to verify numeric data is in range ( GPA 0-4, Weight (100-500, height 50 – 85, age 21 – 120) and not character or strings.
Any additional functions you like to have.
Produce a tabular output to a file (prompt user for file name) and monitor refer to the sample.
Choose meaningful names for functions and variables.
More functions are OK and are encouraged strongly.
Full documentation is required (ID block, Analysis, and Algorithm)
Create a menu driven program to simulate a simple database system. The program will open a file and reads the data and store them in an array of objects to represent the people information as it was created in the first part. The format and a sample of the file are provided above. If you are using arrays make the size 20 and if there are more people in the file print a message and only process the 20 that are stored in the array. Assume all the data stored in the file are correct, no need to verify them.
Implement the following menu:
'O' -- Open an existing people file.
'A' -- Add new person to the current list.
'R' -- Remove a person from the current list.
'P' -- Print person’s info in the current list.
'E' –-Edit information for 1 person.
'S' -- Search.
‘T ’ -- Sort the list
'X' -- Exit the program.
For O : Prompt the user for the file name, then open it. Finally, read the entire file into the list and update the number of elements read.
For A : Add info for a new person if there is space in the list.
For R : Remove a person from the list. (Prompt user for last name)
For P : Show a sub-menu
L: Print all people’s information in the list with a page format to the monitor (refer to sample above)
T : Print all people’s information in the list in a table format to the monitor(refer to sample below)
F : Print in a table format to a file. Format is the same as T above.
For E: Prompt the user for the person’s last name. If name not found, print person not found message and return to main menu. If found provide a sub-menu and allow user to change any data necessary except name.
For S: Prompt the user for the person last name. If name not found, print person not found message and return to main menu, else return the index of the record.
for ‘S’ : Sort list, display a sub-menu:
‘N’ : Sort on names (alphabetical).
‘C’ : Sort on height (high to low descending).
‘S’ : Sort on weight (low to high ascending) .
‘B’ : Sort on net worth (Descending).
For X : Make sure to save the list information to the disk. Print an ending message. Then halt the program.
It is not our intention to break the school's academic policy. Projects posted are only used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly fill out the form.
Please provide a valid email address and we'll get back to you in less than 24 hours.
We will be sending an invoice through PayPal upon confirmation.
We are a non profit organization however we need an amount to keep this organization running,
and to be able to complete our research and development.