Tolling Charges Java Programming Code

An application tracks the amount that account owed for tolling charges. These charges are accrued when crossing a bridge. There are 3 types of accounts: one for cars, one for trucks and one for emergency vehicles. Cars have a person owner with a first and last name, a license plate, and an account number. When a car crossed a bridge the charge is $5. Trucks have a corporation owner, a license plate, and an account number. When a truck crosses the bridge, it is charged $3 per axle. Emergency vehicles are also in the system, but cross the bridge for free. These emergency vehicles have a government owner, an account number and a license plate.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Make classes for all types of vehicles, with all properties mentioned, using inheritance when possible. Each class should have a method that can be called when the vehicle crosses the bridge. The method should keep track of how much the account owes.

In addition to the classes, write some code in a main method that creates some vehicles, post some tolls and prints out their account balance. Your main method code should verify that the method called for each crossing accurately keeps the account balance.

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER