Package crms.lib
Class CarFactory
java.lang.Object
crms.lib.CarFactory
CarFactory is a factory class designed to create
Car objects
Its main purpose is to make sure that created Car objects always have
a unique ID.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CarFactory
-
-
Method Details
-
createCar
Creates aCarobject with specified brand, model, description, and price. This method makes sure that theCarobject has a unique ID;- Parameters:
brand- Brand of the carmodel- Model of the cardescription- Description of the carprice- Price of the car- Returns:
Carobject with a unique ID
-