Question: Create a class called Ticket. Every ticket should have an ID number (an int) and a type (either Parking Violation, Moving Violation, or General Misconduct).
Create a class called Ticket. Every ticket should have an ID number (an int) and a type (either Parking Violation, Moving Violation, or General Misconduct). There should be public methods for: getID, setID, getType, setType. Also there should be a static counter called Counter that counts how many times a ticket is created. There should be a static method called ToString that lists the fine for each ticket (make it up). Show that after two tickets are created the counter is at 2. Call the ToString function in main. Make sure to use THIS when creating your functions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
