public double returnTotalFine(){
	
if (parkingmeter.returnPurchasedMins() >= parkedcar.returnMinsParked()){
	fine = 0;
}
else if (parkingmeter.returnPurchasedMins() - parkedcar.returnMinsParked() <= 60){
	fine = 25;
} 

else{
	fine = (25 + (10 * (parkedcar.returnMinsParked() / 60.0))); 
}
		
return fine;
		
			
}

this is the toString method from the same class as above:

public String toString(){
return ("fine is: " + fine);
}

and then i print that toString method from another object. i always get 0.0 no matter what.

ok so now i'm getting a "Exception in thread "main" java.lang.NullPointerException
at ParkingTicket.returnTotalFine(ParkingTicket.java:29)"


if (parkingmeter.returnPurchasedMins() >= parkedcar.returnMinsParked()){

fine = 0;

}