Write a class called trafficviolations

Assignment Help JAVA Programming
Reference no: EM131596600

Purpose of exercise: To understand and implement the selection constructs.

Write a Java program that can be used to calculate and notify violators of the fines and/consequences for road traffic breaches as shown in the schedule below.

Non-Moving Violation

  • No driver's license

$25.00

  • Expired tag

$20.00

  • No registration

$20.00

  • No insurance

$10.00

Moving Violation

• Speeding violation or speeding in construction zone Miles over the Speed Limit1 - 5 MPH Warning
6 - 9 MPH      $130.00
10 - 14 MPH   $205.00
15 - 19 MPH   $405.00
20 - 29 MPH   $455.00
30 MPH or over appearance   $605.00 and court

The violation notice may comprise of any of the following:
- One or more of non-moving violations alone.
- Combination of non-moving violations, and one kind of moving violation for excess speeding, or speeding in construction zone, but not both.
- Combination of non-moving violations, and one kind of moving violation for speeding in school
zone, or speeding in toll facility, but not both.
- One kind of moving violation only, for excess speeding, or speeding in construction zone, but not both.
- One kind of moving violation for speeding in school zone, or speeding in toll facility, but not
both.

In formulating your solution:

(a) Write a class called TrafficViolations that determines types of traffic violations.

(b) Write a test class called TestTrafficViolations that implements the class TrafficViolations

(c) Demonstrate knowledge of the if statement and the switch statement by using the if/else statement to determine the miles, and the switch statement for the other criteria.

Reference no: EM131596600

Questions Cloud

What is the one food-related regulation : If you had unilateral power, what is the one food-related regulation that you would impose - or abolish? Why would you take this action?
What is metapro direct labor cost variance for august : MetaPro Systems is a start-up company that makes connectors for high-speed Internet connections. What is MetaPro's direct labor cost variance for August
Troubleshooting of complex eigrp networks : Explain and demonstrate competence in the configuration and troubleshooting of complex EIGRP networks
Calculate the variable overhead cost variance for tradiant : Radiant Systems allocates manufacturing overhead based on machine hours. Calculate the variable overhead cost variance for tRadiant
Write a class called trafficviolations : Write a Java program that can be used to calculate and notify violators of the fines and/consequences for road traffic breaches as shown in the schedule
Summarize the facts in narrative or outline form : Summarize the facts in narrative or outline form. Include the most important and pertinent incidents in the situation. (Do not simply restate the entire case.
Compute the operating profit that will be earned : Willow Golf Course is planning for the coming golfing season. Compute the operating profit that will be earned
Discuss the threats when moving to the cloud : Why each of the below are considered new threats when moving to the cloud?
Identity three types of pricing strategies : Identity three types of pricing strategies. Select a good or service and compare the prices of two different companies associated with the goods or service.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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