Computers and Technology

Demonstrating Inheritance: 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.
Demonstrating Inheritance: 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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:00, dadonelson2109
If your accelerator suddenly gets stuck what should you do
Answers: 2
image
Computers and Technology, 22.06.2019 22:30, hmontalvo22
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, sugaree95
What are three software programs for mobile computing?
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, erjalinalii
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
Do you know the correct answer?
Demonstrating Inheritance: You are creating a system for the traffic portion of a police department....

Questions in other subjects: