Your city’s Parking Violation Bureau wants you to write a program to compute fines for parking violations. There are four types of violation: type A carries of $10, type B carries a fine of $20, type C carries a fine of $30, and a type D carries a fine of $50. The program should ask for the name of offender, the number of type A violations, the number of type B violations, and so on. Store the offenders name in a string object. The program should display the offenders name and the total fine for the person.
1
Expert's answer
2012-10-17T10:26:36-0400
import java.util.Scanner;
public class Store {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String name;
int violationA = 0, violationB = 0, violationC = 0, violationD = 0, total = 0;
System.out.println("Enter the offenders name: ");
name = in.nextLine();
System.out.println("Validations A count: ");
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment