Advertisement
akosiraff

Month Class CPP

Sep 22nd, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/month-class-cpp/
  3. Define a class called Month that is an abstract data type for a month. Your
  4. class will have one member variable of type int to represent a month (1 for January, 2 for February, and so forth). Include all the following
  5. member functions: a constructor to set the month using the first three letters
  6. in the name of the month as three arguments, a constructor to set the
  7. month using an integer as an argument (1 for January, 2 for February, and
  8. so forth), a default constructor, an input function that reads the month as
  9. an integer, an input function that reads the month as the first three letters
  10. in the name of the month, an output function that outputs the month as
  11. an integer, an output function that outputs the month as the first three
  12. letters in the name of the month, and a member function that returns the
  13. next month as a value of type Month. The input and output functions will
  14. each have one formal parameter for the stream. Embed your class definition
  15. in a test program.
  16. Download: http://solutionzip.com/downloads/month-class-cpp/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement