Learning Objectives

Class and Object

Understand classes and objects

Explain the difference between a class and an object

Class Diagram -> Class Definition

Explain the purpose of class diagrams (Representing a class graphically)

Understand the notations used in class diagrams (+, :, etc)

Relate class diagrams to object-oriented concepts such as the class (name, fields, methods)

Translate class diagram to their corresponding Java implementation (class definition)

  • Define a class

Object Creation and Manipulation

Create an object from a class using the new keyword

Update the public attributes of an object (Assign new value)

Access the public attributes of an object (Read current value)

Call object's methods

Display object's fields

Constructor (From declaration to using it)

Why?

Characteristics of constructor

Declare constructors for a class with arguments consisting of primitive types and String

Variable scope and this keywords

Create and object using constructor

Constructor overloading (why, what and how)

Array of Objects

Store objects in an array

Last modified: Monday, 14 November 2016, 10:18 AM