Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your task is to create a program that could be used to calculate the cost of purchasing several items. Your program should include: 1.
Your task is to create a program that could be used to calculate the cost of purchasing several items. Your program should include: 1. The name for your store. 2. Accept the quantity the user wants to purchase for 5 items. You will decide what those items are and the price. 3. Calculate the cost of each item. 4. Calculate the subtotal. 5. Calculate the discount for subtotal. You decide on the discount percent. E.g. 5 % - 0.5 * subtotal 6. Calculate the discounted subtotal. E.g. subtotal - discount 7. Calculate the HST. remember to use the discounted subtotal to calculate HST 8. Calculate the total cost. 9. Commenting and appropriate spacing. Add Program header to top of code 10. Round the total cost to two decimal places. 11. Constants for all variables that will not change as the program is run. (Price for items and percentages) Remember to add a welcome message, instruction for the user and thank you message -spacing the text on the screen to make it easy to read. Hint use in to give spacing on screen Note: To create a blank program 1. Click the plus on the top right or sandbox on the top left. 2. Type the name of the program(FirstnameLastintital Assignment#2). 3. Choose Java (Console) This assignment will be evaluated using the following rubric. Category Knowledge Thinking Application Communication Level 4 6/6 Correctly uses various concepts from unit 1. No bugs Correctly solves the problem(s) using efficient algorithms and choice of programming tools. Excellent style Level 3 4.5/6 Almost always correctly uses various concepts from unit 1, but there is a case where a concept is missed. 1 bug Correctly solves the problem(s). A few slips in style. Level 2 4/6 Mostly correctly uses various concepts from unit 1, but there are 2 cases where concepts are missed. 2 bugs One problem is correctly solved, and the other is at least half correct Or One problem is missing at few areas of the solution. One aspect of style is often missing. Level 1 3/6 Correctly uses some concepts from Unit 1. 3+ bugs, but the program does work in some cases. Problem(s) is(are) at least half solved. One aspect of style is missing.
Step by Step Solution
★★★★★
3.46 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
import javautilScanner public class ShoppingCart public static void mainString args Constants final ...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