Please explain why you would expect that. Understand that you're calling the calculateRent() method on the flats variable. Please show where you make settings to the object that this variable...
Type: Posts; User: curmudgeon
Please explain why you would expect that. Understand that you're calling the calculateRent() method on the flats variable. Please show where you make settings to the object that this variable...
OK. Your area and thus your rent is being calculated correctly. You're calculating it on the BlockOfFlats object, and for that object the 0 area is correct.
What are you expecting that the result...
Please edit your post and fix the code tags. Try
//... your code goes here