Jan 31 - DayofYear:DayofYear Day=0 Month=0...

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

View Full Document Right Arrow Icon
Jan 31, 2006, ECE106 Constructors/Destructors Class DayofYear{ Private: Int day; Int month; Public: DayofYear(); //constructor (default) DayofYear(int d, int m);//constructor ~DayofYear();// destructor Void setDay(int); Void setMonth(int); Void print(); }; //-----in implementation---------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: DayofYear::DayofYear(){ Day=0; Month=0; } DayofYear::DayofYear(int d, int m){ Day=d; Month=m; } //--------DayofYear FOJ(1,7); DayofYear* myBirthday; myBirthday = new DayofYear; myBirthday->setDay(5); myBirthday = new DayofYear(5,5); cout<<myBirthday->print();...
View Full Document

This note was uploaded on 04/17/2008 for the course ECE ECE106 taught by Professor Abdelrahman during the Spring '08 term at University of Toronto.

Ask a homework question - tutors are online