Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started