Question: edge of instance and static fields and methods to create the Ticket class needed for * the following TicketDemo-java Overal1 goal: Use a static field
edge of instance and static fields and methods to create the Ticket class needed for * the following TicketDemo-java Overal1 goal: Use a static field to keep track of the nubmer of tickets a police officer gives out. assigne each ticket a unique id number beginning with #100. This number increases by 1 for each new * ticket (ie: 100, 101, 102. The fines for a ticket are based on tier. Multiply the tierlevel by S50.00 to ealeolate the fine If a ticket is in tier #3 then the fine will be 150 (1,e 3 50), . Your Ticket class should work with the following TicketDemo . java. Upload your ticket class to the dropbox. " You are allowed to work with a partner (Include both names in the programmer's documentation) Both students must upload the files to the dropbox public class TicketDemo public static void main(String args //declare two tickets Ticket t1 new Ticket ("Sara Jones-, -speeding", 1); //assigned td 100 and Fine 150 Ticket t2 new Ticket ("Bill Smith, "Parking in no-parking zone", 2) Assigped 101 and Pine 100 //print both tickets print(tl): print(t2) system.out.println( Total number of tickets: Ticket.getcount)/ calls statie method Line:9 Col:3 Code:32 Top1 ovs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
