loader image
Skip to main content
If you continue browsing this website, you agree to our policies:
x

Topic outline

  • Unit 2: Using Java for OO Programming

    In this unit, we will explore objects and take a look at how they differ from classes. From there, we will explore some of the key concepts of OO programming that make it such a desirable choice. These concepts include inheritance, polymorphism, and abstract classes, which allow multiple classes to interact. Encapsulation is the idea of bundling all of your data and methods into a single unit, and restricting the direct access of certain components of your objects, protecting those objects' data from outside manipulation. Finally, we will explore the concept of decoupling, which is how we separate classes to decrease their dependency on one another.

    Completing this unit should take you approximately 3 hours.

    • This section explains fundamentals of object oriented programming. As you read, focus on the difference between classes and objects.

    • This article discusses the use of constructors to build a class and set the initial values of an object. If you think of classes as templates or blueprints of some entity, constructors are the factory that builds the entity and puts it into existence.

    • Getters (also called accessors) and setters (also called mutators) are a fundamental approach to abstraction. This article explains the purpose of getters and setters, and how they are used in Java.

    • This section expands the discussion from objects and classes to inheritance, polymorphism, and abstract classes. These facets of OO programming are a natural consequence of the basic concepts behind objects and classes.

    • Encapsulation facilitates control over access to components of a class. Read this article to get a clear understanding.

    • A major principle of OO programming is keeping the implementation of an object separate from manipulation. This article explains how that works.

    • Take this assessment to see how well you understood this unit.

      • This assessment does not count towards your grade. It is just for practice!
      • You will see the correct answers when you submit your answers. Use this to help you study for the final exam!
      • You can take this assessment as many times as you want, whenever you want.