1) I changed it to a String, allowing for isSuspended method to be called after the numTickets update.
2) good point, simple is better
3) I eliminated the extra tests and changed the addTicket to...
Type: Posts; User: LeslieInNorthPole
1) I changed it to a String, allowing for isSuspended method to be called after the numTickets update.
2) good point, simple is better
3) I eliminated the extra tests and changed the addTicket to...
thanks for the input. I did get it figured out. I didn't need a loop, I needed to find a way to call a method within the same class. Here is the reworked code.
public class DrivingLicense {...
My goal is to write a class called DrivingLicense that is suppose to return ()isSuspended with the tickets exceed 2.
public class DrivingLicense {
String name;
int numTickets;
public...