Question: Need help with C++ project. Can only use doubles, int, and string. No floats allowed. We haven't learned that yet. So far I've only gotten

Need help with C++ project. Can only use doubles, int, and string. No floats allowed. We haven't learned that yet.

Need help with C++ project. Can only use doubles, int, and string.

No floats allowed. We haven't learned that yet. So far I've only

gotten this. I'm not even sure if I'm on the right path.

So far I've only gotten this. I'm not even sure if I'm on the right path. Can someone assist?

#include #include #include #include

using namespace std;

int main() { string unitname, unitprice, unitquantity, taxrate, salesprice; cout

cout

cout > unitname; cout > unitprice; cout > unitquantity;

cout > unitname; cout > unitprice; cout > unitquantity;

cout > unitname; cout > unitprice; cout

cout

cout

// Calculate Cost Summary

salesprice = unitprice * unitquantity;

return 0; }

COMPSCI1: HOMEWORK 1 TOTAL POINTS: 32 ASSIGMEMNT OVERVIEW In this project, you are asked to develop a cashier's calculator program in C++ for the Panther Express. The calculator program asks the user for information about three items, including name, unit price, and quantity, as well as sales tax rate. Then the program calculates the cost for each item, the amount of sales tax, and the total price before and after tax. The program displays the purchase items in an organized, tabular format. It then asks the user for the amount of payment given. The program finally displays the amount of change to be rendered by denomination ($100 bills, $20 bills, $5 bills, $1 bills, quarters, dimes, nickels, and pennies). The following is example of such a program output: SA CAWindows\system32\cmd.exe Panther Express cashier's program Unit name: T-Shirt Unit price for T-Shirt: 12 Unit quanity for T-Shirt: 2 Unit name: Chips Unit price for Chips: 2 Unit quanity for Chips: 5 Unit name: Water Unit price for Water: 1 Unit quanity for Water: 5 Tax rate (in whole numbers):9 $----- cost summary -----$ Item price quantity cost $12 T-Shirt Chips Water 2 5 $2 $1 $24 $10 $5 $----- cost pretax -----$ 39 ----- cost w/ tax 42.51 How money do you have? 80 -Change 37.49 1 1 Denominations $100 bils: $20 bils: $10 bils: $5 bils: $1 bils: Quarters: Dimes: Nickels: Pennies: 2 @ 4 Press any key and enter to exit Compscil DETAILED PROJECT REQUIREMENTS 1. The program should prompt the user to enter the following information for 3 items: o name (which may include space(s)) o unit price ($) o quantity 2. It should also prompt the user to enter the tax rate (assuming the user will enter a number between 0 and 100). 3. After getting the above information from the user, the program should display a summary of the information given by the user. In addition, it should calculate and display the following cost summary: o cost for each item = unit price * quantity o total cost before tax = sum of the costs of the three items o tax=total cost before tax * tax rate o total cost after tax = total cost before tax + tax The cost summary should be shown in a tabular format, in which items in each column are aligned. For full points, the program should use a format comparable to the sample outputs displayed on the previous page. Hint: To display outputs in columns of fixed width, use the setw function from the library. For example, to display a variable named number in a field of 10 characters wide (with the text right aligned in the field), do the following: #include using namespace std; int main() { int number = 5; cout

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 Databases Questions!