GroceryListTester written by S. Robbins apples, price per pound: $1.25, discount: 0.15 starting at 5.25 pounds getName returned apples getPricePerPound returned 1.25 getDiscountRate returned 0.15 getStartingDiscountWeight returned 5.25 oranges, price per pound: $2.05, discount: 0.1 starting at 7.0 pounds pears, price per pound: $3.0, discount: 0.25 starting at 2.0 pounds asparagus, price per pound: $6.0, discount: 0.05 starting at 4.0 pounds The price of 2.0 pounds of apples is $2.5 The price of 5.25 pounds of apples is $5.578125 The price of 5.5 pounds of apples is $5.84375 The price of 12.0 pounds of apples is $12.75 The price of 25.0 pounds of apples is $26.5625 The price of 50.0 pounds of apples is $53.125 All tests for part 2 have been completed ----------------------------------------------------- Empty list is: Add product 1 returned true List is now: apples, price per pound: $1.25, discount: 0.15 starting at 5.25 pounds Add product 2 returned true List is now: apples, price per pound: $1.25, discount: 0.15 starting at 5.25 pounds oranges, price per pound: $2.05, discount: 0.1 starting at 7.0 pounds Add product 3 returned true List is now: apples, price per pound: $1.25, discount: 0.15 starting at 5.25 pounds oranges, price per pound: $2.05, discount: 0.1 starting at 7.0 pounds pears, price per pound: $3.0, discount: 0.25 starting at 2.0 pounds Add product 4 returned false List is now: apples, price per pound: $1.25, discount: 0.15 starting at 5.25 pounds oranges, price per pound: $2.05, discount: 0.1 starting at 7.0 pounds pears, price per pound: $3.0, discount: 0.25 starting at 2.0 pounds All tests for part 3 have been completed ----------------------------------------------------- The price of 2.0 pounds of apples is $2.5 The price of 5.25 pounds of apples is $5.578125 The price of 20.0 pounds of apples is $21.25 The price of 50.0 pounds of apples is $53.125 The price of 2.0 pounds of pears is $4.5 The price of 5.25 pounds of oranges is $10.7625 The price of 5.25 pounds of grapes is $-1.0 All tests for part 4 have been completed ----------------------------------------------------- The new price of 2.0 pounds of apples is $2.5 This is a discount of 0.0 The new price of 5.25 pounds of apples is $5.578125 This is a discount of 0.15 The new price of 5.5 pounds of apples is $5.84375 This is a discount of 0.15 The new price of 12.0 pounds of apples is $11.625 This is a discount of 0.225 The new price of 25.0 pounds of apples is $23.046875 This is a discount of 0.2625 The new price of 50.0 pounds of apples is $44.921875 This is a discount of 0.28125 The new price of 1000.0 pounds of apples is $876.46484375 This is a discount of 0.298828125 All tests for part 5 have been completed ----------------------------------------------------- All parts are working successfully