Java Classes and Objects

4.7
stars
21 ratings
Offered By
Coursera Project Network
2,090 already enrolled
In this Guided Project, you will:

Define instance variables and create a Class variable using static.

Use Encapsulation by providing private instance variables and public getters and setters.

Define Constructors with various parameters and create object instances.

Clock2 hours
IntermediateIntermediate
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In Object-Oriented Programming in a language such as Java, Classes and Objects are often used interchangeably but there is a distinction between the two. A class is a blueprint for objects. In this project you will create an application that defines a Car class and create one to many Car objects. A Car class contains the common attributes all cars have; color, make and model. When a Car Object is made from the Car class, it is then assigned a specific color, such as a red Nissan Sentra or a blue Toyota Camry. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

Class DesignEncapsulationObject-Oriented Programming (OOP)JavaInformation Hiding

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Create the Java Class, identify attributes, and instantiate a Car object.

  2. Define instance variables and create a Class variable using static.

  3. Use Encapsulation by providing private instance variables and public getters and setters

  4. Define Constructors with various parameters and create object instances of the Class.

  5. Override a default method to create a String representation of the Object.

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.