-
4.1 Introduction to Classes and Objects
-
Video
4.1.1 What is a Class?
-
Quiz
4.1.2 Quiz: Classes and Objects
-
Example
4.1.3 The Rectangle Class
-
Example
4.1.4 The Point Class
-
Example
4.1.5 The Student Class
-
Exercise
4.1.6 Using the Rectangle Class
-
Exercise
4.1.7 Calling A Method
-
Exercise
4.1.8 Using the Point Class
-
Exercise
4.1.9 Using the Student Class
-
4.2 Classes vs. Objects
-
Video
4.2.1 Classes and Objects
-
Quiz
4.2.2 Classes vs. Objects vs. Instances
-
Example
4.2.3 Classes, Objects, and Instances
-
Example
4.2.4 Creating Rectangle Objects
-
Exercise
4.2.5 Text Messages
-
4.3 Using a Class as a Client
-
Video
4.3.1 How to Use a Class
-
Quiz
4.3.2 Quiz: Client of a Class
-
Example
4.3.3 Using the Rectangle Class as a Client
-
Example
4.3.4 Using the Randomizer Class as a Client
-
Exercise
4.3.5 Coin Flips
-
Exercise
4.3.6 Longest Streak
-
Example
4.3.7 Testing the GeoLocation Class
-
Exercise
4.3.8 How Far Away is ...?
-
4.4 Writing Classes
-
Video
4.4.1 Constructors
-
Quiz
4.4.2 Quiz: Constructors
-
Example
4.4.3 Student Constructor
-
Example
4.4.4 Rectangle Constructor
-
Exercise
4.4.5 Triangle Class: Constructor
-
Example
4.4.6 Rectangle toString
-
Example
4.4.7 Student toString
-
Exercise
4.4.8 toString for Flowers
-
Exercise
4.4.9 Instance Variables for Your Dog
-
Exercise
4.4.10 Student GPA Field
-
Free Response
4.4.11 Free Response: What instance variables?
-
Exercise
4.4.12 Pizza Time!
-
Exercise
4.4.13 Fractions
-
4.5 Writing Classes and Instance Methods
-
Video
4.5.1 Writing Instance Methods
-
Quiz
4.5.2 Quiz: Writing Methods
-
Example
4.5.3 Area of a Rectangle
-
Example
4.5.4 Moving a Point
-
Exercise
4.5.5 Writing getPerimeter()
-
Exercise
4.5.6 Honors Students
-
Exercise
4.5.7 The Full Triangle Class
-
Exercise
4.5.8 Batting Average
-
Exercise
4.5.9 Distance in Kilometers
-
4.6 Getter and Setter Methods
-
Video
4.6.1 Getter and Setter Methods
-
Quiz
4.6.2 Quiz: Getter and Setter Methods
-
Example
4.6.3 Rectangle Getter Methods
-
Example
4.6.4 Student Getter Methods
-
Exercise
4.6.5 Text Messages Getter Methods
-
Exercise
4.6.6 Fractions Getter/Setter Methods
-
Exercise
4.6.7 Full Fraction Class
-
4.7 Class Methods and Class Variables
-
Video
4.7.1 Static Methods and Variables (Class Methods and Class Variables)
-
Quiz
4.7.2 Quiz: Static Methods
-
Example
4.7.3 Student Class Variables and Methods
-
Example
4.7.4 Using the Math Class
-
Example
4.7.5 Using Randomizer
-
Example
4.7.6 Static Variables: Circle
-
Exercise
4.7.7 The Unit Circle
-
Exercise
4.7.8 How Many Players in the Game?
-
Exercise
4.7.9 Circle Area, another way
-
Practice
4.7.10 Rock, Paper, Scissors: Get Winner
-
Exercise
4.7.11 Rock, Paper, Scissors!
-
4.8 Method Overloading
-
Video
4.8.1 Method Overloading
-
Quiz
4.8.2 Method Overloading Quiz
-
Example
4.8.3 Sum Method Overloading
-
Example
4.8.4 Constructor Overloading
-
Exercise
4.8.5 Product Method Overloading
-
4.9 Local Variables and Scope
-
Video
4.9.1 Local Variables and Scope
-
Quiz
4.9.2 Local Variables and Scope Quiz
-
Example
4.9.3 Instance Variable Scope
-
Example
4.9.4 Local Variable Scope
-
Example
4.9.5 Variable Shadowing
-
Exercise
4.9.6 Which Variables Exist?
-
4.10 Key Terms for Classes
-
Video
4.10.1 Key Terms for Classes
-
Quiz
4.10.2 Quiz: This Keyword
-
Example
4.10.3 Rectangles and this
-
Exercise
4.10.4 Batteries
-
Exercise
4.10.5 Write Your Own CodeHS
-
4.11 Objects vs Primitives
-
Video
4.11.1 Objects vs Primitives
-
Quiz
4.11.2 Objects vs Primitives Quiz
-
Example
4.11.3 Comparing Rectangles
-
Example
4.11.4 Changing Dogs
-
Example
4.11.5 Null Pointer Exception
-
Free Response
4.11.6 Objects vs Primitives
-
Exercise
4.11.7 Comparing Circles
-
4.12 Inheritance
-
Video
4.12.1 Inheritance
-
Quiz
4.12.2 Quiz: Subclasses and Superclasses
-
Example
4.12.3 Square is a Rectangle
-
Exercise
4.12.4 Clothing Store
-
4.13 Class Design and Abstract Classes
-
Video
4.13.1 Class Design and Abstract Classes
-
Quiz
4.13.2 Quiz: Class Design
-
Example
4.13.3 The Shape Hierarchy
-
Example
4.13.4 Classes for Dessert
-
Exercise
4.13.5 Finding The Perimeters
-
4.14 Polymorphism
-
Video
4.14.1 Polymorphism
-
Quiz
4.14.2 Quiz: Polymorphism
-
Example
4.14.3 Animal Sounds
-
Example
4.14.4 Shape Areas
-
Exercise
4.14.5 Fun with Solids
-
4.15 Interfaces
-
Video
4.15.1 Interfaces
-
Quiz
4.15.2 Quiz: Interfaces
-
Example
4.15.3 Comparable Interface
-
Example
4.15.4 Summable Interface
-
Exercise
4.15.5 Fraction is Comparable
-
Exercise
4.15.6 City is Summable
-
Badge
4.15.7 Classes and Object-Oriented Programming Badge
-
4.16 Unit 4 Quiz
-
Quiz
4.16.1 Unit 4 - Classes and Object-Oriented Programming