Navigation

  • index
  • next |
  • previous |
  • COMP 170 »

13. Classes and Object-Oriented Programming

  • 13.1. A First Example of Class Instances: Contact
    • 13.1.1. Making a Datatype
    • 13.1.2. Class Syntax
    • 13.1.3. Instance Variables
    • 13.1.4. Constructors
    • 13.1.5. Instance Methods
    • 13.1.6. Getters
    • 13.1.7. This Object
    • 13.1.8. Setters
    • 13.1.9. ToString Override
    • 13.1.10. Local Variables Hiding Instance Variables
      • 13.1.10.1. Lifetime and Scope Exercise/Example
  • 13.2. Class Instance Examples
    • 13.2.1. More Getters and Setters
      • 13.2.1.1. Statistics Exercise
      • 13.2.1.2. Unneeded Constructor Code Exercise
      • 13.2.1.3. Alternate Internal State Exercise
    • 13.2.2. Converting A Static Game To A Game Instance
    • 13.2.3. Animal Class Lab
    • 13.2.4. Clock Example
      • 13.2.4.1. Alternate Clock Constructor Exercise
      • 13.2.4.2. Clock With Seconds Exercise
      • 13.2.4.3. Twelve Hour Time Exercise
  • 13.3. The Rational Class
    • 13.3.1. Method Parameters of the Same Type
    • 13.3.2. Pictorial Playing Computer
    • 13.3.3. ForceMatch Exercise
  • 13.4. Planning A Class Structure
  • 13.5. Classes And Structs
  • 13.6. Defining Operators (Optional)
    • 13.6.1. Operator Overloading
    • 13.6.2. Casts in User-Defined Classes
      • 13.6.2.1. Operator Overloading Exercise
  • 13.7. Chapter Review Questions
© Copyright 2015, Andrew N. Harrington and George Thiruvathukal. Last updated on 24-January-2016 09:36:04.