Hi guys,
I have 3 classes : 1.Product(Super Class) 2.SmartDevice(Sub Class) 3.Accessories(Sub Class)
so I made 3 tables in database and made productId as a foreign key for smartDevice table and accessories table
so I've had a trouble thinking about what the code of CRUD will be if I used the generalization I mentioned above
Example:
I want to add a function to insert a product into database in the class of product
I Left 2 attachments to explain my condition: