Please enable JavaScript to use CodeHS

{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} {# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #}

Chapter 5

Writing Classes

{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.1 Anatomy of a Class Access Levels Class Access Instance Variable Access Method Access Rectangle Getter Methods Check Your Understanding Exercise: Access for Employee Class
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.2 Constructors State of an Object The Constructor No-Argument Constructor SuperHero Class Initializing an Object without a Constructor Check Your Understanding Exercise: Dog Class
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.3 Documentation with Comments Introducing Comments Multi-line comments Single line comments Preconditions and postconditions Power Class with Comments Comments for Debugging Check Your Understanding Exercise: Commenting Activity Tracker
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.4 Accessor Methods Accessor Methods The Return Value The toString Method Student Getter Methods SuperHero Class with Secret Identity Check Your Understanding Exercise: Text Messages Getter Methods
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.5 Mutator Methods Mutator Methods Creating Mutator Methods SuperHero Class with Mutator Methods Student Setters Check Your Understanding Exercise: Rectangle class
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.6 Writing Methods Recap: The Method Header Passing a Primitive Value Passing an Object Value Access to Private Data and Methods Triangle Class Baseball Player Class Check Your Understanding Exercise: Distance Conversions
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.7 Static Variables and Methods Static Variables and Static Methods Skating and Coding Using Static Methods and Variables Static SuperHero Static Variables: Circle Check Your Understanding Exercise: How Many Players in the Game?
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.8 Scope and Access Variables Inside Constructors and Methods Formal Parameters Method Decomposition Instance Variable Scope Local Variable Scope Variable Shadowing Method Decomposition with Trivia Check Your Understanding Exercise: Broken Calculator
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.9 this Keyword this Keyword Use this As An Actual Parameter Rectangles and this Student and this Check Your Understanding Exercise: Write Your Own CodeHS
{# number the lesson by where it sits in this module: a lesson shared with another module must not link to that other module's number #} 5.10 Ethical and Social Implications of Computing Systems System Reliability Impacts of Computing Legal and Ethical Considerations Check Your Understanding