Question: 7 : Unit test 1 / 1 Test PrintMenu ( ) . Should output the menu options. Feedback PrintMenu ( ) function correctly outputted: MENU

7: Unit test
1/1
Test PrintMenu(). Should output the menu options.
Feedback
PrintMenu() function correctly outputted:
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
8: Unit test
0/1
Test ExecuteMenu('o', myCart). Should output "OUTPUT SHOPPING CART John Doe's Shopping Cart - February 1,2016 Number of Items: 0 SHOPPING CART IS EMPTY Total: $0"
Feedback
ExecuteMenu('o', myCart) function incorrectly outputted:
OUTPUT SHOPPING CART
John Doe's Shopping Cart - February 1,2016
Number of Items: 0
SHOPPING CART IS EMPTY
Total: $0.00
Expected output:
OUTPUT SHOPPING CART
John Doe's Shopping Cart - February 1,2016
Number of Items: 0
SHOPPING CART IS EMPTY
Total: $0
9: Compare output
0/1
Compare output
Input
John Doe
February 1,2016
f
s
q
Your Output
Expected output
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February 1,2016
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Invalid option. Please choose again.
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Invalid option. Please choose again.
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Quitting program.
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February 1,2016
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Choose an option:
Choose an option:
Output differs. See highlights above.
Special character legend
10: Compare output
0/3
Compare output
Input
John Doe
February 1,2016
o
q
Your Output
Expected output ends with
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February 1,2016
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
OUTPUT SHOPPING CART
John Doe's Shopping Cart - February 1,2016
Number of Items: 0
SHOPPING CART IS EMPTY
Total: $0
.00
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Quitting program.
OUTPUT SHOPPING CART
John Doe's Shopping Cart - February 1,2016
Number of Items: 0
SHOPPING CART IS EMPTY
Total: $0
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Output differs. See highlights above.
Special character legend
11: Compare output
0/3
Compare output
Input
John Doe
February 1,2016
a
Nike Romaleos
Volt color, Weightlifting shoes
189
2
o
q
Your Output
Expected output ends with
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February 1,2016
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
ADD ITEM TO CART
Enter the item name:
Enter the item description:
Enter the item price:
Enter the item quantity:
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
OUTPUT SHOPPING CART
John Doe's Shopping Cart - February 1,2016
Number of Items: 2
Nike Romaleos 2 @ $189= $378
Total: $378
.00
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Quitting program.
ADD ITEM TO CART
Enter the item name:
Enter the item description:
Enter the item price:
Enter the item quantity:
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
OUTPUT SHOPPING CART
John Doe's Shopping Cart - February 1,2016
Number of Items: 2
Nike Romaleos 2 @ $189= $378
Total: $378
MENU
a - Add item to cart
d - Remove item from cart
c - Change item quantity
i - Output items' descriptions
o - Output shopping cart
q - Quit
Choose an option:
Output differs. See highlights above.
Special character legend
12: Compare output
0/2
Compare output
Input
John Doe
February 1,2016
a
Nike Romaleos
Volt color, Weightlifting shoes
189
2
d
Spectre DVD
q
Your Output
Expected output ends with
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February 1,2016
MENU
a - Add item to cart
d - Remove item from cart

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!