[Solved] Needing help understanding piece of Java code


On your class DVDPlayer you chose to say that a regular DVDPlayer cannot record. So you set it to false.

If you want it to record you either change the variable directly, like you did on the class DVDPlayerTestDrive.

The boolean canRecord = false is only meant to show you that it is possible to reproduce the behaviour of objects. In this case you have a class that should represent a DVDPlayer and as we know it the majority of DVDPlayers do not record.

Don’t focus much on the code during the first approach to Object Oriented Programming (I assume it is your first OOP language too).

Try to understand the concepts and ideas behind it =)

0

solved Needing help understanding piece of Java code