Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

i need 3 0 7 .

Answered: 1 week ago

Question

What is a manufacturing system?

Answered: 1 week ago