Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Figure 2-4 dealing with abstract

 
Whod Prompt
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic