-
4.1 Introduction to Classes and Objects
-
Video
4.1.1 What is a Class?
-
Check for Understanding
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
-
Check for Understanding
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
-
Check for Understanding
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 ...?
-
Badge
4.3.9 Client Badge
-
4.4 Writing Classes
-
Video
4.4.1 Constructors
-
Check for Understanding
4.4.2 Quiz: Constructors
-
Example
4.4.3 Rectangle toString
-
Example
4.4.4 Student toString
-
Exercise
4.4.5 toString for Flowers
-
Exercise
4.4.6 Instance Variables for Your Dog
-
Exercise
4.4.7 Student GPA Field
-
Free Response
4.4.8 Free Response: What instance variables?
-
Exercise
4.4.9 Pizza Time!
-
Exercise
4.4.10 Fractions
-
4.5 Writing Classes and Instance Methods
-
Video
4.5.1 Writing Instance Methods
-
Check for Understanding
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 Batting Average
-
Exercise
4.5.8 Distance in Kilometers
-
Resource
4.5.9 Combination Lock FRQ
-
4.6 Getter and Setter Methods
-
Video
4.6.1 Getter and Setter Methods
-
Check for Understanding
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
-
Exercise
4.6.8 Full Dragon Class
-
Exercise
4.6.9 A Different Dragon Class
-
4.7 Class Methods and Class Variables
-
Video
4.7.1 Static Methods and Variables (Class Methods and Class Variables)
-
Check for Understanding
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 Wrapper Classes
-
Video
4.8.1 Wrapper Classes
-
Check for Understanding
4.8.2 Quiz: Wrapper Classes
-
Example
4.8.3 Creating Integers
-
Example
4.8.4 Using Doubles
-
Example
4.8.5 Autoboxing Example
-
Exercise
4.8.6 Order Up!
-
Exercise
4.8.7 Currency
-
Exercise
4.8.8 Guess the number!
-
4.9 Method Overloading
-
Video
4.9.1 Method Overloading
-
Check for Understanding
4.9.2 Method Overloading Quiz
-
Example
4.9.3 Sum Method Overloading
-
Example
4.9.4 Constructor Overloading
-
Exercise
4.9.5 Average Method Overloading
-
Badge
4.9.6 Overloading Badge
-
4.10 Local Variables and Scope
-
Video
4.10.1 Local Variables and Scope
-
Check for Understanding
4.10.2 Local Variables and Scope Quiz
-
Example
4.10.3 Instance Variable Scope
-
Example
4.10.4 Local Variable Scope
-
Example
4.10.5 Variable Shadowing
-
Exercise
4.10.6 Which Variables Exist?
-
4.11 Key Terms for Classes
-
Video
4.11.1 Key Terms for Classes
-
Check for Understanding
4.11.2 Quiz: This Keyword
-
Example
4.11.3 Rectangles and this
-
Exercise
4.11.4 Batteries
-
Exercise
4.11.5 Write Your Own CodeHS
-
4.12 Objects vs Primitives
-
Video
4.12.1 Objects vs Primitives
-
Check for Understanding
4.12.2 Objects vs Primitives Quiz
-
Example
4.12.3 Comparing Rectangles
-
Example
4.12.4 Changing Dogs
-
Example
4.12.5 Null Pointer Exception
-
Free Response
4.12.6 Objects vs Primitives
-
Exercise
4.12.7 Comparing Circles
-
4.13 Inheritance
-
Video
4.13.1 Inheritance
-
Check for Understanding
4.13.2 Quiz: Subclasses and Superclasses
-
Example
4.13.3 Square is a Rectangle
-
Exercise
4.13.4 Clothing Store
-
Badge
4.13.5 Inheritance Badge
-
4.14 Class Design and Abstract Classes
-
Video
4.14.1 Class Design and Abstract Classes
-
Check for Understanding
4.14.2 Quiz: Class Design
-
Example
4.14.3 The Shape Hierarchy
-
Example
4.14.4 Classes for Dessert
-
Exercise
4.14.5 Finding The Perimeters
-
4.15 Polymorphism
-
Video
4.15.1 Polymorphism
-
Check for Understanding
4.15.2 Quiz: Polymorphism
-
Example
4.15.3 Animal Sounds
-
Example
4.15.4 Shape Areas
-
Exercise
4.15.5 Fun with Solids
-
4.16 Object Superclass
-
Video
4.16.1 Object Superclass
-
Check for Understanding
4.16.2 Quiz: Object Superclass
-
Example
4.16.3 Default Values
-
Example
4.16.4 Override toString
-
Example
4.16.5 Override equals
-
Exercise
4.16.6 Equal?
-
Exercise
4.16.7 Equals? - Part 2
-
Exercise
4.16.8 Equal Rectangles
-
Exercise
4.16.9 2D Array Tester
-
4.17 Interfaces
-
Video
4.17.1 Interfaces
-
Check for Understanding
4.17.2 Quiz: Interfaces
-
Example
4.17.3 Comparable Interface
-
Example
4.17.4 Summable Interface
-
Exercise
4.17.5 Fraction is Comparable
-
Exercise
4.17.6 City is Summable
-
Badge
4.17.7 Classes and Object-Oriented Programming Badge
-
4.18 Ethical and Social Implications of Computing
-
Video
4.18.1 Implications of Computing Systems
-
Free Response
4.18.2 Computing and Your Life
-
Check for Understanding
4.18.3 Quiz: Ethical and Social Impact
-
Connection
4.18.4 ACM General Ethical Principles
-
Free Response
4.18.5 ACM General Ethical Principles
-
Connection
4.18.6 Bias in Facial Recognition
-
Free Response
4.18.7 Bias in Facial Recognition
-
Connection
4.18.8 Self-driving Cars
-
Free Response
4.18.9 Self-driving Cars
-
4.19 Classes and Object-Oriented Programming Quiz
-
Unit Quiz
4.19.1 Classes and Object-Oriented Programming Quiz