Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M91612925
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Java

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As