• Post Reply Bookmark Topic Watch Topic
  • New Topic

Abstract classes  RSS feed

 
Vlada Den
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have the Product class and the Book class, that extends the Product class. Now if I want to declare the Product class abstract, what changes should I make to the Book class (the child class)?

Thanks!

Vlada
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have the Product class and the Book class, that extends the Product class. Now if I want to declare the Product class abstract, what changes should I make to the Book class (the child class)?


nothing i believe..

you would just say.

abstract class Product
{
// you can have concrete or abstract methods

abstract void getthis(int a);

public void getthat()
{
}
}

then have the other class book

public class book extends Product
{
}

-Justin-
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!