# Module 6: Classes and Objects

MODULE OVERVIEW

This module introduces classes and objects, which form the foundation of
object-oriented programming in Java.



Learners will understand how classes define the structure and behaviour of
objects and how objects represent individual instances of a class.



The module covers class definitions, object creation, attributes, methods and
accessing class members.



Learners will also explore practical examples to understand how classes and
objects are used to organise information and develop structured Java
applications.






WHAT WILL BE COVERED


6.1 WHAT IS A CLASS?

 * Understanding the concept of a class in Java.

 * Exploring classes as templates or blueprints for creating objects.

 * Understanding how classes define attributes and methods.

 * Learning the basic syntax for declaring a class.

 * Identifying the role of classes in object-oriented programming.

 * Understanding how classes help organise application code.


6.2 WHAT IS AN OBJECT?

 * Understanding the concept of an object in Java.

 * Exploring objects as instances of classes.

 * Understanding the relationship between classes and objects.

 * Learning how objects represent real-world entities.

 * Exploring object state and behaviour.

 * Understanding how objects are used in Java applications.


6.3 ATTRIBUTES AND METHODS

 * Understanding attributes as variables defined within a class.

 * Exploring how attributes represent the properties of objects.

 * Understanding methods and their purpose.

 * Defining methods to represent object behaviour.

 * Working with instance variables and methods.

 * Understanding how attributes and methods work together within a class.


6.4 CREATING OBJECTS

 * Understanding the process of object creation in Java.

 * Creating objects using the new keyword.

 * Declaring object reference variables.

 * Initialising objects.

 * Creating multiple objects from the same class.

 * Understanding how each object maintains its own state.


6.5 ACCESSING MEMBERS

 * Understanding how to access class members.

 * Accessing object attributes using the dot operator.

 * Calling methods through object references.

 * Understanding member accessibility.

 * Modifying object properties through appropriate methods.

 * Working with class members to manage object data and behaviour.


6.6 REAL-TIME EXAMPLES OF CLASS AND OBJECT

 * Understanding how classes and objects represent real-world entities.

 * Creating a Student class with attributes such as name, ID and course.

 * Exploring an Employee class with employee details and related methods.

 * Understanding how a Bank Account class represents account information and
   operations.

 * Identifying classes and objects in business applications.

 * Applying object-oriented concepts to practical programming scenarios.


SKILLS YOU WILL GAIN

 * Understanding classes and objects in Java.

 * Defining classes with attributes and methods.

 * Creating and initialising objects.

 * Working with multiple objects from the same class.

 * Accessing and modifying object attributes.

 * Calling methods through object references.

 * Understanding object state and behaviour.

 * Applying classes and objects to real-world programming scenarios.

 * Organising Java applications using object-oriented concepts.


LEARNING OUTCOMES

By the end of this module, learners will be able to:

 * Design Java classes to represent business entities such as employees,
   customers, products and accounts.

 * Define appropriate attributes to store information associated with different
   business entities.

 * Create objects to represent individual records within an application.

 * Develop methods to perform operations related to specific business entities.

 * Access and manage object properties and behaviours using Java syntax.

 * Create multiple objects from a common class to organise application
   information.

 * Apply object-oriented programming concepts to develop structured and reusable
   application components.

 * Understand how classes and objects support the development of business and
   enterprise applications.


CERTIFICATION ALIGNMENT

This module develops foundational object-oriented programming knowledge that
supports the broader learning pathway towards the Oracle Certified Professional:
Java SE 17 Developer certification.

The concepts covered help learners understand class definitions, object
creation, attributes, methods and object interactions within Java applications.


CONTINUE TO THE NEXT MODULE

Continue to Module 7: Constructor to learn how constructors initialise objects,
explore default and parameterized constructors, understand constructor
overloading and identify the differences between constructors and methods.