Question
Change the background of the console to white and the foreground (text color) to black Clear the console Output the title on the console using
Change the background of the console to white and the foreground (text color) to black Clear the console Output the title on the console using your name, not Louie Lumberjack Output a horizontal line on the console Initialize an int variable for number of items to zero Declare a string variable for anotheritem Initialize a double variable for running total to 0 Declare 3 double variables for item cost, shipping cost, and total after shipping. Declare all three of these in a single line of code do (this is the start of your do...while loop) o Prompt the user to enter the cost of the item o Assign the user's response to the item cost variable o Add the item cost to the running total o Increment the number of items variable by 12 Prompt the user if they want to enter in another item Assign the user's response into the anotherltem variable (this is the end of your do...while loop and you should have a conditional expression here that will loop again as long as the value in the anotheritem variable is Y) Using a series of if / else if/else statements, assign the shipping cost a value based on the table provided on the first page of this assignment sheet Assign the calculation of running total + shipping cost into the total after shipping variable. Display the running total Display the shipping cost Display the total after shipping Display a horizontal line Prompt the user to terminate the program Wait for the user to press any key Use this table to determine the shipping cost based on how many items the user orders: Number of items ordered 1 item 2 to 4 items 5 or more items Shipping cost $3.50 $5.00 $7.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started