subject
Computers and Technology, 22.04.2020 04:49 tttyson

You are creating a system for the traffic portion of a police department. It will one day be placed in new handheld computers so the officers on traffic duty can print these tickets from handheld computers. Java is a perfect language to create this kind of application as we learned earlier in the course. There are several types of Ticket though so this is a perfect one to demonstrate inheritance with.

a. Every Ticket has a Tag (license plate number), Make, Model, and Color.

b. Each Ticket also has a special versionhese are the inheriting classes...

c. A TimeExpiredTicket is a Ticket for a car parked too long in a timed zone or when a parking meter has no time left and shows the expired flag while the car is there. This type of ticket has a $50 charge.

d. A HandicappedTicket is a Ticket for a car parked in a handicapped zone with no handicapped permit on it. This type of ticket has a $100 charge.

e. A FireLaneTicket is a Ticket for a car parked in fire lane or beside a fire hydrant. This type of ticket has a $150 charge.

f. Make the ticket super class, and the three subclasses inheriting from it. Then write a class with main0 to test your new classes by making at least one object of each of the three types of tickets (expired, handicapped, and fire lane) and later report their information stored in them to the user

Note: You can put the charge in the a message being printed or as a variable holding the value. It's up to you. You do have to have the tag, make, model, and color along with their gets and sets only in the ticket superclass. You have to demonstrate inheritance here by inheriting from the base class which is holding these values.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:30
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 22.06.2019 23:50
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form.you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used.hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
You know the right answer?
You are creating a system for the traffic portion of a police department. It will one day be placed...
Questions
question
Geography, 14.11.2019 20:31
question
Mathematics, 14.11.2019 20:31
question
English, 14.11.2019 20:31
question
Mathematics, 14.11.2019 20:31