Question: while using the source codes for mainmenu.cpp and cashier.cpp at the bottom of the page. Serendipity Booksellers Software Development Project Part 3: A Problem-Solving Exercise
while using the source codes for mainmenu.cpp and cashier.cpp at the bottom of the page.
Serendipity Booksellers Software Development
Project Part 3: A Problem-Solving Exercise
1.The Main Menu
Modify the mainmenu.cpp program so it lets the user enter a choice from the menu. The choice will be a number in the range of 1 through 4, so it can be stored in either an int or char variable.
2.The Cashier Module
You are ready to add some of the point-of-sale functionality to the project. Currently, the cashier.cpp program displays a simulated sales slip without any sale information. Modify this program so that prior to displaying the simulated sales slip, it asks for the following data:
The date. Expect the user to enter a date in the form MM/DD/YY. This should be entered as a string and stored in a string object variable.
The quantity of the book being purchased: Store this number in an integer variable.
The ISBN number of the book being purchased. The ISBN number is a string that contains numbers and hyphens. Use a string object variable to store it.
The title of the book. Store the book title in a string object variable.
The unit price of the book. Store this number in a floating-point variable.
Here is an example of what the screen might look like:
Serendipity Booksellers
Cashier Module
Date: 5/24/12
Quantity of Book: 2
ISBN: 0-333-90123-8
Title: History of Scotland
Price: 19.95
Once the data is entered, the program should calculate the merchandise total (multiply quantity by price) and a 6 percent sales tax. The program should then display a simulated sales slip. Here is an example:
Serendipity Book Sellers
Date: 05/24/12
Qty ISBN Title Price Total
___________________________________________________________
2 0-333-90123-8 History of Scotland $ 19.95 $ 39.90
Subtotal $ 39.90
Tax $ 2.39
Total $ 42.29
Thank You for Shopping at Serendipity!
The dollar amounts should all be displayed in fields of six spaces with two decimal places of precision. They should always be displayed in fixed-point notation and the decimal point should always appear.
3.The Inventory Database Menu
Modify the invmenu.cpp program so it lets the user enter a choice from the menu. The choice will be a number in the range 1 through 5, so it can be stored in either an int or char variable.
4.The Reports Menu
Modify the reports.cpp program so it lets the user enter a choice from the menu. The choice will be a number in the range 1 through 7, so it can be stored in either an int or char variable.
Here are the source codes:
source code for cashier.cpp
#include#include using namespace std; int main() { string date, ISBN, Title; int numOfBook; double price, subtotal, tax, total; cout<<"Serendipity Booksellers"< > numOfBook; cout<< "ISBN "; getline (cin, ISBN); cout<< "Title: "; getline (cin, Title); cout<< "Price: "; cin >> price; cout<<"Serendipity Booksellers"< > cout<<"\t Subtotal "; cout<<"\t Tax"< source code for mainmenu.cpp
#include#include using namespace std; int main() { int choice; cout<<"\t Serendipity Booksellers"< > choice; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
