hi guys, i want to ask questions for OOP designs, i want to practice to make online shop
i have some designs in my mind:
- Product class as base class for other specific product, it has(all protected) id,price, get_id(), get_price()
- Specific product class, example T-shirt, it will extends Product, it has(protected) size,colour.
the question is:
-should i use interface like Sellable (it will have methods that like get_stock(), add_stock(), etc) or should i just add the methods(get_stock(), add_stock()) in the parent class(Product class) ??
please give me some tips, i will really appreciate it.
note:sorry for the bad english.