Search:

Type: Posts; User: Norm

Search: Search took 0.18 seconds.

  1. Re: Need direction on how to get the output desired from Parking Ticket Simulator

    Glad you got it working.
  2. Re: Need direction on how to get the output desired from Parking Ticket Simulator

    You still are printing a line with null. Where is that coming from? Which println statement is printing it?
    Look for a println with only one item in the (). Add an ID String there for testing:...
  3. Re: Need direction on how to get the output desired from Parking Ticket Simulator

    Forget about testing it, just print it and you can see what it is:
    System.out.println("parkedCar=" + parkingMeter.getParkedCar());


    What is the name of the variables you are talking about?
  4. Re: Need direction on how to get the output desired from Parking Ticket Simulator

    You need to see exactly what variable has the null value and then backtrack in the code to see where the null value came from.

    Yes, programming has lots of details and they must all be handled...
  5. Re: Need direction on how to get the output desired from Parking Ticket Simulator

    That info is in the current instance of the class. Use the this reference variable when you need to refer to the current instance of the class.

    Where are these lines printed:
    Parking Ticket 0001...
  6. Re: Need direction on how to get the output desired from Parking Ticket Simulator

    Where is the line with null being printed? Why is it null and not the information about the car?

    Why do you create a new instance of PoliceOfficer in the PoliceOfficer class's checkMeter() method?...
Results 1 to 6 of 6