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.

Please study the material at each of the links below.

  1. The Date class
  2. Constructors
  3. Class methods
  4. Better methods
  5. Invalid dates
  6. Comparing dates
  7. The + operator
  8. The day of the week
Like us on Facebook:


OER: Open Educational Resource
Creative Commons License Author: Janet E. Joy; Publisher: Zebra0.com
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Creative Commons Attribution-NonCommercial 4.0 International License
Last modified: May 18 2017 14:00:04.