T
Tony Johansson
Hello!
Assume I have a store that have DVD movies and VHS movies and that customers
can rent any of the movies that the store have in stock.
In the Windows Form I use a readOnly DataGridView to represent the all the
movies that I have in stock.
I use a DataBase as a DataSource and here I use one database table called
Stck which store all the movies both DVDand VHS movies that I have in the
stock.
I use another DataGridView that is not readOnly when I want to add new
movies to the Stock.
Now to my question. Is it any point to use inheritance for the DVD and VHS
here because we can set up a inheritance hierarcy here. We can set an
abstract class like Product as the base class and derive the DVD movie class
and VHS movie class from this abstract Product class.
//Tony
Assume I have a store that have DVD movies and VHS movies and that customers
can rent any of the movies that the store have in stock.
In the Windows Form I use a readOnly DataGridView to represent the all the
movies that I have in stock.
I use a DataBase as a DataSource and here I use one database table called
Stck which store all the movies both DVDand VHS movies that I have in the
stock.
I use another DataGridView that is not readOnly when I want to add new
movies to the Stock.
Now to my question. Is it any point to use inheritance for the DVD and VHS
here because we can set up a inheritance hierarcy here. We can set an
abstract class like Product as the base class and derive the DVD movie class
and VHS movie class from this abstract Product class.
//Tony