{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CIS247_LAB1 - return day int main days Day1 Day2 string x...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <string> using namespace std; class days { private : string day; public : void print() const ; void setDay(string); string getDay(); }; void days::print() const { cout << day << endl; } void days::setDay(string x){ day = x; } string days::getDay() {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return day; } int main() { days Day1, Day2; string x; Day1.setDay( "Monday" ); Day2.setDay( "Tuesday" ); Day1.print(); Day2.print(); x = Day1.getDay(); Day2.setDay(x); Day2.print(); return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online