Answered step by step
Verified Expert Solution
Link Copied!

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 2151996104.95.7
y
Jesse Choi 1241962161.95.11
n
the output is:
|Anne|Niebuhr|Febraury 15,1996|5.7 feet|104.9 lbs|
|Jesse|Choi|December 4,1962|5.1 feet|161.9 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 1 to 12, your exception should produce the message: Invalid Month assigned - must be 1 to 12
if the day is out of range of 1 to 31, your exception should produce the message: Invalid Day assigned - must be 1 to 31
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 CIST2362 namespace. All of the classes in your program belong to this namespace, and so you will see CIST2362::Person referring to the Person class in the CIST2362 namespace. Namespaces are covered in Chapter 9 if you need to refer back.

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_2

Step: 3

blur-text-image_3

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

List elements to consider when developing an employee handbook.

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago