Question: this program allows users to input person data, storing that data in a vector. Then after the last person the program outputs the person data.
this program allows users to input person data, storing that data in a vector. Then after the last person the program outputs the person data. The data collected for each person is first and last name, date of birth as month, day, and year, and the weight and height.
Ex: if input is:
Anne Niebuhr
y
Jesse Choi
n
the output is:
AnneNiebuhrFebraury feet lbs
JesseChoiDecember feet lbs
This is what will happen if all the data is entered correctly. However, your program should use exceptions to potential input errors:
if the month is out of range to your exception should produce the message: Invalid Month assigned must be to
if the day is out of range of to your exception should produce the message: Invalid Day assigned must be to
if the year is a negative value, your exception should produce the message: Invalid Year assigned must be a positive number
if the height is negative, your exception should produce the message: Invalid Height assigned must be a positive number
if the weight is negative, your exception should produce the message: Invalid Weight assigned must be a positive number
In order to get this program working properly, you will need to insert missing code in all of the files. There are quite a few files, but take it one at a time. Remember, there are quite a few unit tests to test your classes before you need to get the main working. Take advantage of this to incrementally build and test your classes. Also, remember that you can build stubs that will allow you to compile the program until you are able to completely fill in the code.
Note that this program makes use of Namespaces. You are expected to explicitly use the namespaces versus employing the "using" statement. This means you will have code like std::cin that says you are referencing cin from the standard namespace. The other namespace you will have in this program is the CIST namespace. All of the classes in your program belong to this namespace, and so you will see CIST::Person referring to the Person class in the CIST namespace. Namespaces are covered in Chapter if you need to refer back. Upload your files below by dragging and dropping into the area or choosing a file on your hard drive.
This lab can only be submitted once every minutes
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
