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

  Details of all advertisers registered with the service

Create a list of 6-7 different customers of both types with made-up details built in to the client program - display the details of all advertisers registered with the service,

  Develop a set of classes for a college

Person: A Person contains a first name, last name, street address, zip code, and phone number. The class also includes a method that sets each data field and display method that displays all of a Person's information.

  Write a class encapsulating the concept of student

Prepare a client class to test all the methods in your class. Make sure to add comments. Comments should be included in the program to explain your calculations and program.

  Creates a new magazinenode object and adds it to the end

The public variables are accessed by the MagazineList class.

  Develops algorithms for problem solving

The graduate designs and develops algorithms for problem solving and implements those algorithms using appropriate program code.

  Design a solution to the problem by using the five steps to

the software needs to allow the restaurant owner to schedule employees for up to 40 hours in a seven-day week. the

  Creates an array with x randomly generted integer elements

Write a program DuplicateTester.java that prompts user for a posi- tive integer x and creates an array with x randomly generted integer ele- ments in range 0 to 9. Use a method with signature public static int[] removeDuplicates(int[] array); to remo..

  What is the java source filename extension

What is the Java source filename extension? What is the Java bytecode filename extension and write a Java statement to display the string The value is 100 to a user in a plain dialog box.

  What does the class hierarchy of the applet class look like

My applet runs fine with appletviewer but not in the browser, what can be the problem? What does the class hierarchy of the Applet class look like?

  Implements both the quicksort and mergesort algorithms

Write a program that correctly implements both the Quicksort and Mergesort algorithms. The program should generate an array of 500 random numbers in the 1-100 range. The program should sort the same set of numbers and keep time stamps of how long it ..

  Give the definition of a class named doctor

Give the definition of a class named Doctor whose objects are records for a clinic's doctors.

  Write a java program that uses the elapsed time

Write a Java program that uses the elapsed time for an event in second and then outputs the elapsed time in hours, minutes and seconds. (For example, if the desired time is 9630 seconds, then the output is 2: 40: 30)

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