Access over 35 million academic & study documents

Report

Content type
User Generated
Subject
Java
Type
Homework
Rating
Showing Page:
1/6
Class diagram :

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/6
HayloValidate class contains static method for validating name, phone, vehicles number and fuel
tanks number.
HayloVehicle class models a vehicle with a type and a number of cells. I has a constructor with type
and cell number argument, getters for each attribute and a toString() method that give a string
summary of the vehicle.
HayloCustomer class represents a customer with first name, last name, phone, number of vehicle
and number of tanks. A Constructor with all these argument creates an initialized customer. All the
assessors of the fields are implemented, and a customized toString() used to display properly a
customer object.
HayloFactory class as it name would suggest used to facilitate the creation of vehicles and tanks,
calculations of all the related costs and counting of all the cumulative data over many orders.
HayloFactoryController class contains the main method. In the main method, the user is asked to fill
an input for its name, phone number, number of vehicle and number of tanks he want.
Input is validated and user is asked to correct any incorrect input. When correct data is given, the
user selects the one type of vehicle and summary is displayed with customer and vehicle details:
customer name, vehicles type and number, tanks cost, vehicle cost, subtotal, tax and total. The user
is asked if he want to add another order, if he wants to add more the same process if followed. And if
not the summary of all orders is displayed. That summary includes it total numbers of orders, total
vehicles processed, total tanks processed and total sales.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/6

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 6 pages?
Access Now
Unformatted Attachment Preview
Class diagram : HayloValidate class contains static method for validating name, phone, vehicles number and fuel tanks number. HayloVehicle class models a vehicle with a type and a number of cells. I has a constructor with type and cell number argument, getters for each attribute and a toString() method that give a string summary of the vehicle. HayloCustomer class represents a customer with first name, last name, phone, number of vehicle and number of tanks. A Constructor with all these argument creates an initialized customer. All the assessors of the fields are implemented, and a customized toString() used to display properly a customer object. HayloFactory class as it name would suggest used to facilitate the creation of vehicles and tanks, calculations of all the related costs and counting of all the cumulative data over many orders. HayloFactoryController class contains the main method. In the main method, the user is asked to fill an input for its name, phone number, number of vehicle and number of tanks he want. Input is validated and user is asked to correct any incorrect input. When correct data is given, the user selects the one type of vehicle and summary is displayed with customer and vehicle details: customer name, vehicles type and number, tanks cost, vehicle cost, subtotal, tax and total. The user is asked if he want to add another order, if he wants to add more the same process if followed. And if not the summary of all orders is displayed. That summary incl ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Just what I needed…Fantastic!

Studypool
4.7
Indeed
4.5
Sitejabber
4.4