+ 1

How do I make a shop of technology on Python with the priming of polymorphism and inheritance ?

It is necessary to implement the "Add to cart" functionality for an online store for goods sold: for example, laptops, styluses, tablets. Task: write code using the principle of polymorphism, and make sure that all products can be put in the basket and the site automatically gives the buyer a message every time: "Product so-and-so has been added to the cart."

13th Nov 2023, 7:09 AM
Dzhalil Tilov
2 Answers
+ 1
No . That's the problem, I do not know how to approach the task. I am creating several classes with the same add_cart method . However , I need to implement adding objects to the cart , while giving the user the opportunity to choose which object and how much to add .
13th Nov 2023, 8:44 AM
Dzhalil Tilov