Title: Module 4 - Writing Classes
Course: COP 2551 Intro to Object Oriented Prog > Section: Module 4 - Writing Classes

Introduction

In the last module you made the process of writing programs easier by using predefined classes from the Java class library. This module explores the basics of class definitions. You will continue your journey to the heart of object-oriented programming by designing and writing your own classes to define your objects.

How do you write your own class? In this module you will learn the basics of class definitions, including constructors, the structure of methods and the scope and encapsulation of data. Constructors are different from methods in two important ways.

Objectives

Upon completion of this module, the student will be able to:

- Describe the structure and content of a class definition.
- Establish the concept of object state using instance data.
- Explore the effect of visibility modifiers on methods and data.
- Describe the structure of a method definition, including parameters and return values.
- Describe the structure and purpose of a constructor.

Readings & Resources

Chapter 4, Sections 1 – 5 Java Software Solutions: Foundations of Program Design, 8^th Ed., John Lewis and William Loftus.

Assignments and Activities

- Complete the Module 4 Ungraded Activities
- Complete the Module 4 Quiz
- Begin Programming Project 3
- Submit Programming Project 2