Prep 7: Module 7

Module Overview

Module Overview

Module Introduction

Module Introduction

Overview of an Object

Overview of an Object

Exercise: Anatomy of an Object

Part 1: Introduction

Anatomy of an Object: Introduction

Part 2: The Exercise

  • In the exercises7 package of the exercises source folder, open the Person class.

  • Follow the instructions, using Java comments to designate the various parts of the object's definition.

Part 3: Solution

Anatomy of an Object: Solution

How to make and use objects

How to make and use objects

Roundtable: Instantiating objects

Video
Part 1
Part 2
Part 3
Part 4

How are objects stored?

How are objects stored?

Roundtable: Object placement in memory

Video
Part 1
Part 2
Part 3
Part 4
Part 5

Object design

Object design

Roundtable: Designing a hockey stick

Video
Part 1
Part 2
Part 3

Roundtable: Designing a weight lifting exercise

Designing a weight lifting exercise

Exercise: Try designing an objects

You have seen examples of object design in the videos. Now it's your turn.

  • Think of an object you want to design: perhaps something important or relevant to your life. It should be some kind of noun, related to your studies, hobbies, or other interests.

  • In the exercises7 package of the exercises source folder, create a new class named appropriately for the object you are designing.

  • In that file, define the object's instance variables, constructor(s), and methods. Provide accessors and mutators where appropriate.

Roundtable: Scope and instance variables

Video
Part 1
Part 2

Conclusion

Conclusion