aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Figure 2-4 dealing with abstract Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Figure 2-4 dealing with abstract" Watch "Figure 2-4 dealing with abstract" New topic
Author

Figure 2-4 dealing with abstract

Whod Prompt
Greenhorn

Joined: Mar 20, 2003
Posts: 10
On Kathy and Burts book, I'm on chapter 2 and the figure 2-4 shows AcmeRover and it has a method called goOffRoad() which says it's required. I'm wondering why this is required? It's not in Car, Sportscar or SUV.
Linda Pan
Ranch Hand

Joined: Sep 24, 2001
Posts: 96
Whod,
Abstract goOffRoad() is a method crated specifically for the abstract SUV class. SUV class is an abstract class with an abstract goOffRoad() method.
AcmeRover is a concrete subclass of abstract SUV class, therefore it must implement all abstract methods of the superclass. That would be why it is required in the AcmeRover class. Hope that helps.
[ March 27, 2003: Message edited by: Linda Pan ]
Whod Prompt
Greenhorn

Joined: Mar 20, 2003
Posts: 10
thanks so much for taking time to help me. I appreciate it.
I'm sorry my problem was that I wasn't reading it correctly. I was only seeing GoForward() and I was thinkig it was a typo or mistake, because I didn't see GoOffRoad() in the SUV class. Therefore, it wasn't making sense to me. Thanks so much for the help, it cleared things up
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Figure 2-4 dealing with abstract