Question
Submit the following files Main.cpp Date.h Date.cpp calcDays.h calcDays.cpp were exposed to the date they received their second vaccination dose (+ 2 weeks to be
Submit the following files Main.cpp Date.h Date.cpp calcDays.h calcDays.cpp
were exposed to the date they received their second vaccination dose (+ 2 weeks to be considered fully vaccinated). Create a function calcDays that takes as input two instances of Date. This function should return the number of days between the two dates recorded in datel and date 2. Use pass by const reference to pass datel and date to the function. Do NOT use a library to calculate the difference between datel and date2. Instead, implement this simple algorithm: 1. Calculate number of days between 01/01/2021 and datel as daysDiffi 2. Calculate number of days between 01/01/2021 and date2 as daysDiff2 3. Calculate number of days
between daysDiffi and daysDiff2. Use the number returned by calcDays to determine a student's vaccination status at the time of exposure. Client Program Requirements Depending on the user input, your program should create the following instances from class Date: datePositive, dateExposed, and date Second Dose. Only create an instance if necessary. For example, if a student replies they tested positive, their vaccination status and whether they were exposed is irrelevant. It is your choice how you format the questions to collect user information. However, all user input to record a date must be validated as explained above. After your program has
collected all necessary information and made all necessary calculations, your program should tell the user if and how long they must isolate together with all data they have entered. Format your output as follows: Example output: Case 1 from above Test result: positive Date tested positive: 02/01/2022 Length of isolation: 5 days Case 2 from above Test result: negative Exposed to positive case: No Length of isolation: 0 days . . Case 3 from above Test result: negative
Exposed to positive case: Yes Date exposed to positive case: 02/01/2022 Second vaccination does received: Yes Date second vaccination dose received: 01/01/2022 Vaccination status at time of exposure: fully vaccinated Length of isolation: 5 days Case 4 from above Test result: negative Exposed to positive case: Yes Date exposed to positive case: 02/01/2022 Second vaccination does received: Yes Date second vaccination dose received: 01/31/2022 Vaccination status at time of exposure: not fully vaccinated Length of isolation: 10 days Test result: negative Exposed to positive case: Yes Date exposed to positive case: 02/01/2022 Second vaccination does received: No Vaccination status at time of exposure: not fully vaccinated Length of
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