Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a class project. I tried as best as I could to copy and paste the instructions from microsoft word. please ask me if

This is a class project. I tried as best as I could to copy and paste the instructions from microsoft word. please ask me if you need any more clarifications on the specifics.

Programming Project 1 Due Date 06/03 by 11:59pm

Complete, compile, run, and submit the following projects (see Attachments)

Serendipity Booksellers Software Development is Ongoing Project.

Project 1 consists of five parts:

Part 1: Program Specifications - 20 points

Part 2: A Problem-Solving Exercise - 20 points

Part 3: A Problem-Solving Exercise - 20points

Part 4: A Problem-Solving Exercise - 20points

Part 5: A Problem-Solving Exercise - 20points

Complete all parts of the Project1 using a Standard C++ compiler and submit them in the Project1 dropbox via Blackboard.

Deliverables:

1. Submit your source code (.cpp file)

2. Screenshots of your run in MS Visual C++ (or any standard C++ Compiler) in this Project dropbox as attachments.

Notes for Project1, Part 1:

Create a comma separated file InventoryDatabase.txt that contains the following fields using your home library or any online bookstore with the 15 records.

Fields are ISBN

Title

Author

Publisher

Date added

Quantity-On-and

Wholesale Cost

Retail Price

Example of the File is listed below:

Attachments:

Part 1

Part 2

Part 3

Part 4

Part 5

Project Part 1: Program Specifications

Serendipity Booksellers is a small bookstore located in a shopping mall. They have a cashier station equipped with a personal computer. The manager wants you to develop a point-of-sale (POS) software package that will make the computer function as a cash register and keep an inventory file. The inventory file will be a database of all the books in the bookstore. In general, the software is to perform the following tasks:

Calculate the total of a sale, including sales tax

When a book is purchased, subtract it from the inventory file

Add, change, delete, and look up books in the inventory file

Display various sales reports

You will build on the project by implementing newly learned features from each chapter. In the end, you will have designed and written a fully functional software package that incorporates most of the topics covered in the text.

The Modules

The program will be organized into the following three modules:

Cashier module

Inventory Database module

Report module

When the program runs, a menu will be displayed on the screen, which allows the user to activate any of the modules. A discussion of each module follows:

The Cashier Module

The Cashier module allows the computer to act as a cash register. The user enters information for the books being purchased and the program calculates the sales tax and the total price. In addition, the books being purchased are automatically subtracted from the Inventory Database.

The Inventory Database Module

The Inventory Database will be a file containing a list of all the books in Serendipitys inventory. The following information for each book will be stored in the file:

Field

Description

ISBN

This is the International Standard Book Number. It is a unique number assigned to each book by the publisher.

Title

The title of the book.

Author

The books author.

Publisher

The company that publishes the book.

Date Added

The date the book was added to the inventory.

Quantity-On-Hand

The number of copies of the book in inventory.

Wholesale Cost

The price paid by Serendipity for each copy of the book.

Retail Price

The price Serendipity is charging for each copy of the book.

The Inventory Database module will allow the user to look up information on any book in the file, add new books to the file, delete books, and change any information in the database.

The Report Module

The Report module will analyze the information in the Inventory Database to produce any of the following reports:

Inventory List. A list of information on all books in the inventory.

Inventory Wholesale Value. A list of the wholesale value of all books in the inventory and the total wholesale value of the inventory.

Inventory Retail Value. A list of the retail value of all books in the inventory and the total retail value of the inventory.

List by Quantity. A list of all books in the inventory sorted by quantity on hand. The books with the greatest quantity on hand will be listed first.

List by Cost. A list of all books in the inventory, sorted by wholesale cost. The books with the greatest wholesale cost will be listed first.

List by Age. A list of all books in the inventory, sorted by purchase date. The books that have been in the inventory longest will be listed first.

Project Part 2: A Problem-Solving Exercise

Screen Design

For this chapters assignment, you are to write programs that display the main screens used in the project. The screens have already been designed, so your primary task is to write the C++ code that displays them. For testing purposes you will create a separate program for each screen. (In later chapters you will merge these into one program.) Here is a list of the programs you should have after completing the assignment for this chapter:

mainmenu.cpp cashier.cpp invmenu.cpp bookinfo.cpp reports.cpp

Assignments

Create the Main Menu Screen.

Create a program called mainmenu.cpp. It should display the following screen:

Serendipity Booksellers

Main Menu

Cashier Module

Inventory Database Module

Report Module

Exit

Enter Your Choice:

Create the Cashier Screen.

Create a program called cashier.cpp. It should display the following screen:

Serendipity Book Sellers

Date:

Qty ISBN Title Price Total

___________________________________________________________

Subtotal

Tax Total

Thank You for Shopping at Serendipity!

Create the Inventory Database Menu Screen.

Create a program called invmenu.cpp. It should display the following screen:

Serendipity Booksellers

Inventory Database

1. Look Up a Book

2. Add a Book

3. Edit a Books Record

4. Delete a Book

5. Return to the Main Menu Enter Your Choice:

Create the Book Information Screen.

Create a program called bookinfo.cpp. It should display the following screen:

Serendipity Booksellers

Book Information

ISBN:

Title:

Author:

Publisher:

Date Added:

Quantity-On-Hand:

Wholesale Cost:

Retail Price:

Create the Reports Menu Screen.

Create a program called reports.cpp. It should display the following screen:

Serendipity Booksellers

Reports

1. Inventory Listing

2. Inventory Wholesale Value

3. Inventory Retail Value

4. Listing by Quantity

5. Listing by Cost

6. Listing by Age

7. Return to Main Menu

Enter Your Choice:

Project Part 3: A Problem-Solving Exercise

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.

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.

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.

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.

Project Part 4: A Problem-Solving Exercise

The Main Menu

Modify the mainmenu.cpp program so it validates the users input. If a value outside the range of 1 through 4 is entered, the program should display an error message. Here is an example screen:

Serendipity Booksellers

Main Menu

1. Cashier Module

2. Inventory Database Module

3. Report Module

4. Exit

Enter Your Choice: 5

Please enter a number in the range 1 4.

Later, in Chapter 6, you will begin merging you will begin merging all the programs you have written into the mainmenu.cpp file. You will now start making preparations for that. After the user input has been validated, add a switch statement that branches to a section of code, depending on which menu choice the user made. For now, the program should simply display a message like You selected item 1 when the user enters a number. Here is an example of the screen:

Serendipity Booksellers

Main Menu

1. Cashier Module

2. Inventory Database Module

3. Report Module

4. Exit

Enter Your Choice: 3

You selected item 3.

The Inventory Database Menu

You will make the same modifications to invmenu.cpp that you made to mainmenu.cpp.

Modify the invmenu.cpp program so it validates the users input. If a value outside the range of 1 through 5 is entered, the program should display an error message. Here is an example screen:

Serendipity Booksellers

Inventory Database

1. Look Up a Book

2. Add a Book

3. Edit a Books Record

4. Delete a Book

5. Return to the Main Menu

Enter Your Choice: 9

Please enter a number in the range 1 5.

After the user input has been validated, add a switch statement that branches to a section of code, depending on which menu choice the user made. For now, the program should simply display a message like You selected item 1 when the user enters a number. Here is an example of the screen:

Serendipity Booksellers

Inventory Database

1. Look Up a Book

2. Add a Book

3. Edit a Books Record

4. Delete a Book

5. Return to the Main Menu

Enter Your Choice: 2

You selected item 2.

The Reports Menu

You will make the same modifications to reports.cpp that you made to mainmenu.cpp and invmenu.cpp.

Modify the reports.cpp program so it validates the users input. If a value outside the range of 1 through 7 is entered, the program should display an error message. Here is an example screen:

Serendipity Booksellers

Reports

1. Inventory Listing

2. Inventory Wholesale Value

3. Inventory Retail Value

4. Listing by Quantity

5. Listing by Cost

6. Listing by Age

7. Return to Main Menu

Enter Your Choice: 8

Please enter a number in the range 1 7.

After the user input has been validated, add a switch statement that branches to a section of code, depending on which menu choice the user made. For now, the program should simply display a message like You selected item 1 when the user enters a number. Here is an example of the screen:

Serendipity Booksellers

Reports

1. Inventory Listing

2. Inventory Wholesale Value

3. Inventory Retail Value

4. Listing by Quantity

5. Listing by Cost

6. Listing by Age

7. Return to Main Menu

Enter Your Choice: 5

You selected item 5.

Project Part 5: A Problem-Solving Exercise

Data Validation Modification

In Part 4 of this project you used if statements in each module to validate the input. Modify the code to use while loops instead.

The Main Menu

Item four on the Main Menu is Exit, which allows the user to end the program. Add a loop to the mainmenu.cpp program that causes it to repeatedly display the menu until the user selects item four.

The Inventory Database Menu

Item five on the Inventory Database Menu is Return to the Main Menu. When the project is complete, this item will cause the program to branch back to the main menu. For now, add a loop to the invmenu.cpp program that causes it to repeatedly display the menu until the user selects item five.

The Reports Menu

Item seven on the Reports Menu is Return to the Main Menu. When the project is complete, this item will cause the program to branch back to the main menu. For now, add a loop to the reports.cpp program that causes it to repeatedly display the menu until the user selects item seven.

The Cashier Module

After the user has entered the data for a sale and the simulated sales slip is displayed, add code that asks the cashier if another transaction is to be processed. If so the program should repeat.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions

Question

Define Management or What is Management?

Answered: 1 week ago

Question

What do you understand by MBO?

Answered: 1 week ago

Question

What is meant by planning or define planning?

Answered: 1 week ago