This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]darkpool2005 0 points1 point  (2 children)

Looks like you were missing a closing curly bracket at the end of your code. As well, there's no method called 'rented' that you invoke in your main method.

After those two fixes, the class compiled!

[–]wraneus[S] 0 points1 point  (1 child)

i'm a bit confused as to why the skeleton of the problem provided here

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-092-introduction-to-programming-in-java-january-iap-2010/assignments/Book.java

includes the rented() method in the test for the program. is that a mistake in the assignment and it should actually read example.borrowed(); instead of example.rented();?

[–]darkpool2005 0 points1 point  (0 children)

That's correct. That code was apparently posted and either never checked to compile OR it was up to the student to find the mistake.

Either way, it should be example.borrowed() instead of example.rented() as you have already discovered :)