I had a null value in the return statement, I fixed this and figured out how to get all the amounts to match up. I am turning this in before I mess anything else up and thank you again for helping...
Type: Posts; User: havinFun
I had a null value in the return statement, I fixed this and figured out how to get all the amounts to match up. I am turning this in before I mess anything else up and thank you again for helping...
public class PoliceOfficer
{
private String name; // name of officer.
private String badgeNumber; // identifier for officer.
// constructor with parameter of name and badge number...
in the ParkedCar class, there is make, model, color, and license....This should by all in theCar variable.
I tried the print statement that you provided, this is what I got as an output:...
so....I placed a print line in the police officer class:
if(parkingMeter.getParkedCar() != null)System.out.println(" my car "); // trying to find the null value.
I put the statement above...
ok....I kind of see what you are saying. I will try to get the null issue fixed, and then get back to you.....Thank you for your help so far!
from what I can tell, the null value comes from the ParkingTicket class, where the toString is located. Is that correct? But theCar gets the variables from ParkedCar class so this is where I am...
basically I am having trouble calling methods from other classes then to display the output.
Here is the type of ticket that should be returned (cannot change)
enum TicketType
{
OVERTIME_PARKING_VIOLATION,
EXPIRED_METER_VIOLATION
}
Hello,
Before I start explaining my issue, I have researched the Parking Ticket Simulator and found many many references, but I am pretty sure that I am missing some important details.
This is...