Gillius's Programming Forums

Hosted Forum: West Visayas State University - Philippines => Problem Solving and Programming Class Forum => Topic started by: louiecerv on February 23, 2006, 09:08:35 AM

Title: Programming Exercise - An Abstract Data Type > Month
Post by: louiecerv on February 23, 2006, 09:08:35 AM
Define a class called Month that is an abstract data type for month.  Your class will have one member variable of type int to represent month (1 for January, 2 for February, and so forth).  Include all the following member functions:

A constructor to set the month using the first three letters in the name of the month, a constructor to set the month using an integer as an argument (1 for January, 2 for February and so forth), a default constructor, an input function that reads the month as integer, an input function that reads the month as three letter in the name of the month, and a member function that returns the next month as a value of type Month. The input and output functions will each have one formal parameter for the stream. Embed your class definition in a test program.
Title: Download from our yahoogroups site
Post by: louiecerv on February 23, 2006, 09:47:31 AM
Due to the length of the file, I decided to post the solution at the class yahoo site.  Please download and study. Then come back here and let us discuss.

Happy coding everyone!
Title: Re: Programming Exercise - An Abstract Data Type > Month
Post by: fredyrockz on March 02, 2010, 04:29:39 AM
Hi what source for the solution ?

I wanna do some revision...TQ