-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCandyCart.py
More file actions
19 lines (14 loc) · 750 Bytes
/
CandyCart.py
File metadata and controls
19 lines (14 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Candy
class CandyCart(Candy.Candy):
def __init__(self, candyName, candyStockLevel, candyRetailPrice, candyCostPrice, candyCategory, candyImage, candySupplier, candyKeyInformation, candyIngredients, candyCountry):
super().__init__(candyName, candyStockLevel, candyRetailPrice, candyCostPrice, candyCategory, candyImage, candySupplier, candyKeyInformation, candyIngredients, candyCountry)
self.__quantity = 0
self.__subtotal = 0
def set_quantity(self, quantity):
self.__quantity = quantity
def get_quantity(self):
return self.__quantity
def set_subtotal(self, subtotal):
self.__subtotal = subtotal
def get_subtotal(self):
return self.__subtotal