0% found this document useful (0 votes)
21 views1 page

Project Description CIS203-Second Term 1444H

The document describes the requirements for classes in a transportation company system including: 1. A TransportationCompany class with properties like name, capacity, lists of vehicles, employees, and customers along with methods like adding/deleting vehicles and displaying lists. 2. An Employee class with username/password properties and login/password change methods. 3. A Customer class similar to Employee with username/password properties and login/password change methods. 4. An abstract Vehicle class and subclasses for specific vehicle types (Car, Airplane, Boat) with properties like category and abstract/concrete methods to output vehicle details. 5. A TestTransportationCompany class to test the system by creating sample transportation company

Uploaded by

opada az
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Project Description CIS203-Second Term 1444H

The document describes the requirements for classes in a transportation company system including: 1. A TransportationCompany class with properties like name, capacity, lists of vehicles, employees, and customers along with methods like adding/deleting vehicles and displaying lists. 2. An Employee class with username/password properties and login/password change methods. 3. A Customer class similar to Employee with username/password properties and login/password change methods. 4. An abstract Vehicle class and subclasses for specific vehicle types (Car, Airplane, Boat) with properties like category and abstract/concrete methods to output vehicle details. 5. A TestTransportationCompany class to test the system by creating sample transportation company

Uploaded by

opada az
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Project CIS 203 – 10 Points

Design using UML of the following classes (define is-a and has-a relationship) for Transportation
Company System, then write the Java Code.
Notes: you should select variable types correctly from the following data types set {int, float, double, String,
boolean, ArrayList}
1. A TransportationCompany class has the following:
o properties: company name, capacity of the transportation company, list of Vehicles , list of Employees,
list of Customers.
o operations: parameterized constructor which initializes the capacity of the company,
o displayVehicles(), displayEmployees(), dispalyCustomers() methods.
o addVehicle(Vehicle) to add one Vehicle to the list of Vehicles,
o deleteVehicle(Vehicle) to delete from the Vehicle list.
o compareVehicle(), which will take two vehicles as argument and return true if they are from the same
class and false otherwise.
o searchVehicle(), which will take a Vehicle as an argument and return its index in the list of vehicles if it
exists and -1 otherwise.
o printInformation(), which prints the name and capacity of the transportation company along with the
information of the list of vehicles.
2. An Employee class has the following:
o properties: username and password (private)
o operations: parameterized constructor
o operations: login method, setPassword (you must check the old password)
3. A Customer class has the following:
o properties: username ,password (private) and customer ID
o operation: parameterized constructor
o operations: login method, setPassword (you must check the old password).
Notes: the login method will take user name & password as parameters and compare it with the instance
variable username and password.
4. An abstract class Vehicle, and it has the following:
o properties: category, description, and speed
o property: class variable count to compute the instances created from object vehicle.
o operation: parameterized constructor and toString methods
o operation: abstract method publish() which prints on the screen the vehicle information.
5. There are three types of Vehicles :
o Car: which has extra attributes (color, model)
o Airplane: which has extra attributes ( (type of plane, such as, “Boeing”) capacity (seating capacity of
the plane – a whole number up to 400))
o Boat: which has extra attributes (name and sail position (0 or 1)).
o Define proper constructor and toString operations for each of these three classes.
o Define the method publish() to print all information for each type.
6. TestTransportationCompany class which performs the following:
Based on data in the table below:
o Create an instance of the class transportation company.
o Create three vehicles: one car, one airplane and one boat. Add them to the list of vehicles.
o Print information about the created transportation company.
o Display all the Employee and Customers in the Company.
Transportation company name : NoBorders Capacity: 100
List of vehicles
# vehicles Category Description Speed
1 Car(Black, BMW) Move in land Car of color black of model BMW 300
2 Airplane (Boeing, 350) Move in air Airplane boeing of capacity 300 500
3 Boat: (titanic,0) Move in water Boat named titanic 80

You might also like