CIS247_LAB1 - return day; } int main() { days Day1, Day2;...

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( &quot;Monday&quot; ); Day2.setDay( &quot;Tuesday&quot; ); Day1.print(); Day2.print(); x = Day1.getDay(); Day2.setDay(x); Day2.print(); return 0; }...
View Full Document

This note was uploaded on 01/30/2011 for the course BUS 247 taught by Professor Long during the Winter '10 term at DeVry Long Beach.

Ask a homework question - tutors are online