Please enable JavaScript to use CodeHS

IB Computer Science Higher Level (Year One)

Lesson 18.1 Introduction to Classes and Objects

Description

In this lesson students learn about classes and objects, the foundation of Object Oriented Programming. This lesson introduces a lot of new vocabulary, but it will be reinforced and used in concrete examples and exercises over the next several lessons.

Students have been creating objects of the String class, they just haven’t dove into that terminology yet. In this lesson, students will learn about objects, which are things that have state and behavior, and classes, which are the templates for creating objects. Students will be creating instances of objects in this lesson.


Objective

Students will be able to:

  • Describe the relationship between classes and objects
  • Create programs that create (instantiate) multiple objects from a given class
  • Create programs that call methods on an object and print out the result