Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have the dayMgr.hpp and dayMgr.cpp finished, I just don't know how to make the main.cpp. Please help: dayMgr.hpp: #pragma once #include #include using namespace

I have the dayMgr.hpp and dayMgr.cpp finished, I just don't know how to make the main.cpp. Please help:

dayMgr.hpp:

#pragma once

#include

#include

using namespace std;

class dayType

{

public:

void setDay();

string getDay();

string AddDays();

void PrintDay();

void nextDay();

void prevDay();

string Days[7] =

{"Sun", "Mon", "Tue", "Wed", "Thurs" , "Fri", "Sat"};

int day;

};

dayMgr.cpp:

#include "dayMgr.hpp"

#include

#include

using namespace std;

int day;

int newDay;

int tempDay;

string Days[7] =

{"Sun", "Mon", "Tue", "Wed", "Thurs" , "Fri", "Sat"};

int getDay()

{

cout << "What is the current day?: " << endl <<

"0-Sun 1-Mon 2-Tue 3-Wed 4-Thurs 5-Fri 6-Fri ";

cin >> day;

return day;

}

void AddDays()

{

cout << "How many days would you like to add: ";

cin >> newDay;

tempDay = (day + newDay) % 7;

}

void PrintDay()

{

cout << "The current day is: " << Days[day];

cout << "The new day is: " << Days[tempDay];

}

void prevDay()

{

cout << "The previous day is: " << Days[day - 1];

}

void nextDay()

{

cout << "The next day is: " << Days[day + 1];

}

main.cpp:

int main()

{

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions