Program that computes the annual road tax

Assignment Help JAVA Programming
Reference no: EM13942056

Write a program that computes the annual road tax (vehicle excise duty) charges for three types of vehicles: vans, cars and motorcycles.

The road tax rate is calculated as follows for each type of vehicle:

Vans
Light goods vehicles weighing less than 3500kg are charged at 165 GBP (British Pounds); otherwise they are charged at 190 GBP.

Cars
All cars registered on or before 1 March 2001 are charged according to their engine size (in cc). A car with an engine size of less than or equal to 1550cc is charged at 110 GBP; otherwise it is charged at 165 GBP.

If the date of car's registration is after 1 March 2001, the annual road tax charge is calculated according to the CO2 emission of the vehicle. The table below displays the different road tax charges for this criterion.
(Hint: see the API documentation for the Date and DateFormat class)

Petrol Car

CO2 Emission Figure (g/km) 12 months rate in GBP
------------------------------------ ------------------------------
Up to 100 65.00
101 to 120 75.00
121 - 150 105.00
151 - 165 125.00
166 - 185 145.00
Over 185 160.00

Table 1: Road tax charges for private vehicles registered on or after 1 March 2001

Motorcycles
Motorcycles are charged according to their engine size (in cc). The following table displays the list of road tax charges according to this criterion.

Motorcycles
Motorcycles (with or without sidecar) 12 months rate in GBP
------------------------------------------- ------------------------------
Not Over 150cc 15.00
151cc - 400cc 30.00
401cc - 600cc 45.00
All other motorcycles 60.00

Table 2: Road tax charges for motorcycles

Task

Create an invoicing system that will ask the user to input a vehicle's

a) Manufacturer name (e.g. Toyota)

b) Model (e.g. Avensis)

c) Date of registration (e.g. 17/12/2002)

Depending on the type of vehicle (van, car or motorcycle), the program should proceed to produce an invoice containing the above input details as well as the amount of road tax charge to be paid for that particular vehicle.

Output screen 1 displays the program's results for a car registered before 1 March 2001 (based on engine size), while output screen 2 displays the same program's results for a car registered after 1 March 2001 (based on CO2 emission).

You must use inheritance when creating classes for the various types of vehicles, and the program should not crash if the user inputs incorrect data. The code must be well explained.

2475_s1.png

1828_s2.png

Reference no: EM13942056

Questions Cloud

Understanding of the differences in social culture : 1. As a global manager, how would you rethink your concept of time and patience to assure you and your global partners are on the same page? 2. As a global manager, what other "forces" lead to the understanding of the differences in social culture?
Write a reflective analysis based on your leadership skills : You are to write a Reflective Analysis based on your Leadership Skills and Leadership Behavior.
How many units must rosenberg sell in the first year : How many units must Rosenberg sell in the first year to break even? Carefully explain, including any assumptions that you make
Difficulties in financial statement analysis : Please respond to all of the following prompts in the class discussion section of your online course: Many assets are presented at historical cost. Why does this accounting principle cause difficulties in financial statement analysis?
Program that computes the annual road tax : All cars registered on or before 1 March 2001 are charged according to their engine size (in cc). A car with an engine size of less than or equal to 1550cc is charged at 110 GBP; otherwise it is charged at 165 GBP.
Decided to use the money to start a retirement account : When Jamal graduated from college recently, his parents gave him $1,460 and told him to use it wisely. Jamal decided to use the money to start a retirement account. After doing some research about different options, he put the entire amount into a ta..
Double taxation of corporate profits : 1) Double taxation of corporate profits refers to: 2) Social enterprises emphasize:
Estimate the roof temperature under steady-state conditions : Estimate the roof temperature under steady-state conditions - explore the effect of changes in the absorptivity, emissivity, and convection coefficient on the steady-state temperature.
What is the projects weighted average cost of capital : A firm with a corporate wide debt-to-equity ratio of 0.5, an after cost tax of debt of 7 %, and a cost of equity capital of 15% is interested in pursuing a foreign project. What is the project’s weighted average cost of capital?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Controlling and using the paintcomponent ( ) method

How to paint the screen -Controlling and using the paintComponent ( ) method Deliverables app.java, myJFrame.java, myJPanel.java,  and other necessary Java files

  Java assignment

Java Assignment

  Write a program to track hourly employee departure

A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock.

  Determine the average amount of time people spend waiting

Determine the average amount of time people spend waiting for tables -  The fancy new French restaurant La Food is very popular for its authentic cuisine

  Java application prompt user to put in integer from keyboard

Write a java application that performs the following task: prompt user to put in an integer from the keyboard, search for the user input from the array created in step 1.

  Construct java program named collegelist

Construct a set of classes for a college to use in many student service and personnel applications. Classes you require to design include following:

  Create a console program that prompts the user

Create a console program that prompts the user to enter the name and address of their employer and position they hold or the name and address of their favorite restaurant and their favorite meal

  Create a jsp that displays the student name

Create a JSP that displays the student name and the current score, given the EMPLID and class ID. For each class, a text file is used to store the student name, EMPLID, and current score

  Hypothetical situation

Hypothetical Situation - A company lowers its price of an economy car a small amount   ($15,000 to $14,000) Sales go from 10,000 units to 50,000 units. Another company lowers its price on a luxury car a large amount ($80,000 to $40,000). Its sales go..

  Create your own unique java application

Create your own unique Java application to read all data from the file echoing the data to standard output. After all data has been read, display how many data were read. For example, if 10 integers were read, the application should display all 10..

  Practice using recursion with data structures

Write a recursive method in this class called hasSameStructureAs(BinaryTree tree) that returns whether or not a tree has the same structure as another tree.

  Applet to converts a character to a corresponding integer

Design an applet Conversion.java that converts a character to a corresponding integer, and vice versa. The integer corresponding to a character is its ASCII code.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd