DMV Project: Jiaju Liu Period 1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

DMV Project

Jiaju Liu
Period 1
DMV Operation

 The DMV stores data on different types of vehicles (model, color, VIN,
expiration date, etc.) attached to users and admins and performs many
actions required for a DMV to function.
 Users may make new accounts, register vehicles, renew vehicles, and access
their information.
 Admins may perform all the user actions for any user. In addition, they may
change vehicle ownership and view the entire DMV information.
Demonstration
Classes
Classes and Their Representations

 Vehicle (abstract)- defines basic objects and methods for car, motorcycle and
boat classes.
 Car – represents a real car.
 Motorcycle – represents a real motorcycle.
 Boat – represents a real boat.
 Account (interface)- defines basic object and methods for user and admin
classes.
 User- represents a user account.
 Admin- represents an admin-run account
 Menu- represents DMV homepage and login page.
 Driver- driver class for DMV.
Account

 Interface for admin and user


Admin and User

 Inherit from account


 Define the classes for people
that interact with the DMV
 Make up array lists in menu class
Vehicle

 Abstract class
 Outlines basic variables and
methods for other classes
Car, Motorcycle, and Boat

 Classes that represent


vehicles that belong to users.
Stored in the array list of the
owner object.
Menu and Driver

 Menu contains code that displays text for the


user to interact with.
 Driver runs the menu.
Inheritance

 Car, motorcycle, and boat inherit basic variables and methods from vehicle.
 Admin, and user inherit basic variables and methods from account.
Interface

 (see account)
Polymorphism

 Admin and user both call register and renew methods but do different things
Features, bugs, second-party code

 Method to find user or admin


 Converts repetitive block of code to a method
 Methods are general to be applied to cars, motorcycles, and boats

 Code will crash if an invalid data type is inputted

 Code is all self-written


Conclusion

 Project was challenging: few specific requirements


 Rewarding to finish debugging
 Final product: fully functional that uses array lists to be infinitely expandable
and includes many methods found in a real DMV. However, it lacks a way to
add money to accounts.
 I learned:
 How to make code more modular and readable
 Casting in array lists
 How to print large amounts of data in an easily readable way

You might also like