Zebra0.com

cpp dateDate Class: Using a class

Date Class: Using a class

Learn C++ in step-by-step lessons.

Date Class: Using a class

In this lesson you will use a Date class. Using the Date class and looking at the code will help you to understand what is involved when you write your own classes.


Goals:

Objectives:

Please study the material at each of the links below.

  1. Getting date from system clock Getting date from system clock
  2. Leap year explanation Leap year explanation
  3. Starting the Date class Starting the Date class
  4. Discussing the Date class Discussing the Date class
  5. The Date class
  6. Test the Date class Test the Date class
  7. Create the Date class
  8. Date methods Date methods
  9. Constructors Constructors
  10. Class methods: toString
  11. Better methods Better methods
  12. Invalid dates
  13. Comparing dates
  14. The + operator
  15. The day of the week
GlossaryGlossary for date lesson
Full Glossary