1. Engineering
  2. Computer Science
  3. part 1 groceryitem 20 points for part i you must...

Question: part 1 groceryitem 20 points for part i you must...

Question details

Part 1: GroceryItem (20 points) For part I you must implement the constructor, getNam mutliplyltemCount, setCount, setName, setCost, setCategory, str_ and _repr methods. You may not change the method definitions. See the doc strings in the file for information and see the usage below for details. e, getCount, getCost, getCategory >>>gr-GroceryItem ) >>>str (gr) :0:0: >>>repr (gr) Groceryitem,0, o, >>>gr2-GroceryItem(milk,1.99,2, dairy) >>>gr GroceryItem (milk,1.99,2, dairy) >>> str(gr2) milk:1.99:2:dairy >>> gr2.getcost 1.99 >>>gr2.setcost (2.99) >> gr2 GroceryItem (milk,2.99,2, dairy >>> str (gr2) milk:2.99:2:dairy >>>gr2.multiplyItemCount (3) >>> str (gr2) milk:2.99:6:dairy >>> repr (gr2) GroceryItem (milk,2.99,6, dairy)

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution