Author Topic: Programming Exercise - An Abstract Data Type > Month  (Read 10198 times)

louiecerv

  • Moderator
  • User
  • *****
  • Posts: 85
Programming Exercise - An Abstract Data Type > Month
« 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.
Analyze. Design. Develop. Debug. Deploy. Maintain.

louiecerv

  • Moderator
  • User
  • *****
  • Posts: 85
Download from our yahoogroups site
« Reply #1 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!
Analyze. Design. Develop. Debug. Deploy. Maintain.

fredyrockz

  • User
  • *
  • Posts: 1
Re: Programming Exercise - An Abstract Data Type > Month
« Reply #2 on: March 02, 2010, 04:29:39 AM »
Hi what source for the solution ?

I wanna do some revision...TQ