Question: 7 : Unit test 1 / 1 Test PrintMenu ( ) . Should output the menu options. Feedback PrintMenu ( ) function correctly outputted: MENU
: Unit test
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
: Unit test
Test ExecuteMenuo myCart Should output "OUTPUT SHOPPING CART John Doe's Shopping Cart February Number of Items: SHOPPING CART IS EMPTY Total: $
Feedback
ExecuteMenuo myCart function incorrectly outputted:
OUTPUT SHOPPING CART
John Doe's Shopping Cart February
Number of Items:
SHOPPING CART IS EMPTY
Total: $
Expected output:
OUTPUT SHOPPING CART
John Doe's Shopping Cart February
Number of Items:
SHOPPING CART IS EMPTY
Total: $
: Compare output
Compare output
Input
John Doe
February
f
s
q
Your Output
Expected output
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February
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
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
: Compare output
Compare output
Input
John Doe
February
o
q
Your Output
Expected output ends with
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February
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
Number of Items:
SHOPPING CART IS EMPTY
Total: $
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
Number of Items:
SHOPPING CART IS EMPTY
Total: $
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
: Compare output
Compare output
Input
John Doe
February
a
Nike Romaleos
Volt color, Weightlifting shoes
o
q
Your Output
Expected output ends with
Enter customer's name:
Enter today's date:
Customer name: John Doe
Today's date: February
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
Number of Items:
Nike Romaleos @ $ $
Total: $
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
Number of Items:
Nike Romaleos @ $ $
Total: $
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
: Compare output
Compare output
Input
John Doe
February
a
Nike Romaleos
Volt color, Weightlifting shoes
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
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
