Objectives

Students will be able to:

  • implement the Factory design pattern.

Object Oriented Programming

Factories

 

Scenario

A computer program allows people to buy, rent or share cars.

The user simply identifies what type of car is required and the car is delivered and driven away.

Getting Started

Create a new project in your IDE and setup the following files:

Worksheet Task

Run the Main program and start answering the questions in the Worksheet.

Return to the Worksheet.

Glossary

factory

static

class variable

private

data hiding

encapsulation/p>

instance variable