OOP Design for Car Rental System
OOP Design for Car Rental System
ADVANCED PROGRAMMING
09 de Abril de 2022
1
INDEX
PROBLEM DESCRIPTION
CONCLUSIONS
BIBLIOGRAPHY.......................................................................................................................10
2
1. INTRODUCTION
For the above reasons, in this work, we will apply the following considerations that we
they will help develop the proposed statement:
Class Diagram using OOP.
JAVA Programming Language.
Fundamental concepts of OOP.
Association, Composition, Aggregation, Inheritance, and Polymorphism.
Good Practices in OOP and Design.
Likewise, the objective of this work is to be able to design a solution for the company 'Car-'
"Rent," which allows, through Object-Oriented Programming, to develop a
program aimed at improving the management of the company.
For the above reasons, the structure of this report will include the following aspects:
Analysis and design of the solution.
Aspects and fundamentals of programming.
Conclusions.
3
DESCRIPTION OF THE PROBLEM
According to the request from the company Car-Rent, an automated system is required.
to improve the management of the company and make available the processes that are currently used for the
control of rental and return of vehicles.
Based on the client's request, the objective of this work is to design a program.
considering Object-Oriented Programming, which allows developing a solution related
with the implementation of a program that is capable of maintaining adequate control of the
vehicles that are rented and returned at the company.
For the above, the class diagram was developed, where the identified and managed
attributes, considering the following methods:
- Rental
- Vehicle
- Client
- Return
(image 1.1)
4
(image 1.2)
5
considering also
that when entering
a new vehicle
initially take the
condition of
available (D).
Client Name Validate customer entry
Rut considering:
Validity New entry
client.
Route to have a long one
of 10 digits with
penultimate digit a
script and last digit
with a value between 0 to
9 or a k.
Validate that the client
be current (true:
valid, false: no
valid.
Upon entering a new
client his condition
initial validity is
true
Return -Fecha Devolución Validate the return of the
considering:
Return date
cannot be less than
the rental date.
Add the book to the
- -
Analyzed the requirement of the client Car-Rent and considering the purpose of the solution
proposed, the following Class diagram was developed:
6
Note: At the design level, it is possible to see that the relationship indicates that the "Loan" is
composed of "Vehicle" and "Client".
7
2. Vehicle Class
The Vehicle Class also maintains an 'aggregated' relationship with the Class
Renting, which is a strong relationship, since, at the moment of completing a rental,
A vehicle is absolutely necessary to generate the rental.
3. Class Return
This class maintains a 'composed' type relationship with the Rental Class, which is a
very strong relationship, because it only exists if a rental is formalized, otherwise
news rental, it makes no sense that it exists since there is nothing to return.
It should be considered that when a lease is generated, the return date is created.
associated with the rental of the specific vehicle.
4. Rental Class
This class maintains a strong 'aggregated' relationship with the Vehicle and Customer Class.
If the vehicle or customer does not exist, the rental will not be finalized.
It also has a very strong 'composite' type relationship with the Class.
Return, since if a lease is not generated, there is no return date.
8
CONCLUSIONES
Once all attempts have been made to develop the best solutions to the issue
From the statement, the following can be inferred:
Finally, based on our established objective, it can be concluded that the level of achievement
achieved is considered as "medium" since even though it is estimated that the design of classes
and their relationships are accurate, it was not possible to faithfully develop the functionality that the client
For the above reasons, it is essential to continue with the training and resolution of
issues that contribute to optimal familiarization with O.O.P.
9
BIBLIOGRAPHY
10