Project Overview

D esigning and implementing a program with the use of Object-Oriented Program paradigm. During any project, a problem is always presented by the client, users or consumers. The key importance is to always have a clear and organised plan when designing a solution to a problem. An Important skill that I have utilised during this project was identifying the correct tools and design methods required to develop the solution when I was analysing the problem.

Problem Description and Requirement Description

    Locks and clouds are shown in a 3D graphic illustration
  • Develop a program that implements a basic vehicle rental system.
  • Implement a console system from where the manager can add new vehicles, delete if needed, print the vehicle information, etc. (as described in detail below).
  • Implement a Graphical User Interface (GUI) from where a customer can see the list of vehicles and book available vehicles for specific dates.

My Approach to Design

For me, the most important principle to follow when designing this particular project was to ensure that system is consistent with Object-Oriented principles and its easy to understand by other programmers. I have created a UML class diagram and a Use Case diagram which will provide me with the ability to develop the objects in a structured Object-Oriented structure.

UML Class Diagram

/

According to the Inheritance principle, I’ve designed a superclass ‘Vehicle’ with subclasses of ‘Car’ and ‘Motorbike. The following methods within all the classes I’ve decided to use, allows me to utilise the encapsulation principle. This way I can hold information about the plate number and make without separately instantiating the subclass objects which provides flexibility and scalability of my code.

Use Case Diagram

/

There are two interfaces designed for 2 separate types of consumers. The managers will be able to add data to these objects directly and edit the data displayed to the customer using the console. The customers, on the other hand, will be using the GUI to rent out cars for a specific amount fo time.

My Approach to Implementation

Object Properties:
  • The car class holds specific information and methods. I added the ‘carNoDoors’ and ‘carNoSeats’ instance variables and the relative get/set methods.
  • The Motorbike class holds specific information and methods. I added the ‘motorWeight’ instance variable and the relative get/set methods.
  • I’ve designed a class Schedule to represent the time slot when a vehicle has been booked. The class have a ‘pick-up date’ and a ‘drop-off date’ (this represents the date I can use to integrate java API).
  • I’ve designed a class called ‘WestminsterRentalVehicleManager’, which implements the interface ‘RentalVehicleManager’. ‘WestminsterRentalVehicleManager’ maintains the list of the vehicle to rent and provides all the methods for the system manager.

Console Menu

  • Add a new vehicle in the rental system. It is possible to add a new vehicle, either a car or a motorbike with all the relevant information. I have considered that in the rental car park there is a limit, I’ve decided to have max 50 parking lots.
  • Delete a vehicle from the system, selecting the plate number. Displaying a message with the information of the vehicle that has been deleted (if it is a car or motorbike) and the number of available parking lots in the garage.
  • Print the list of vehicles in the system. For each vehicle, the console prints the plate number, the type of vehicle (it is a car or a motorbike). The list is also ordered alphabetically according to the vehicle make.
  • Write/Save the vehicle stock list in a file after any changes.

GUI Menu

  • The user can visualise the list of vehicles in ‘WestminsterRentalVehicle’ system.
  • The user can filter the vehicles according to one parameter (The type of the vehicle).
  • The user can check the availability of the vehicle in specific dates and can book make a reservation if it is available.

Test Plan

/
/
/
/

Outcome/ Learnings

During this project, I have failed to implement functionalities from the GUI, I encountered problems designing forms using InteliJ IDE and integrating the objects to be used by the GUI form with the additional Java API. I was able to create at least a useful feature to display a list of the vehicles the manager has entered to the customer.

  • I have learnt the essentials of planning, implementing an application utilising UML diagrams, Use cases and test cases to identify the project progress and approach the problem by simplifying tasks into smaller parts.
  • How to apply acquired knowledge of concepts, characteristics, tools and environments to adapt to new computational environments and programming languages which are based on Object-Oriented principles.
  • Design, implement efficiently applications based on an OOP language, given a set of functional requirements
  • Implement GUI interfaces using an OOP language.
  • Most importantly, I’ve learnt how to identify and justify good practices in the development of Object-Oriented structured software.

Thank you for reading about my project, I hope this helped you understand how to approach a project and tackle the problems, you can check out this project or any other of projects on my GitHub.


Go back to

Projects