This is my half-done assignment. I need it working using regular MS Visual Studio and using std. I need the code to be well commented. Please let me know if you have any questions. I have provided the...

1 answer below »



This is my half-done assignment. I need it working using regular MS Visual Studio and using std. I need the code to be well commented. Please let me know if you have any questions. I have provided the zip file with my existing files (these are the files that need to be submitted. Please do not change the structure and the number of files). I have also provided a ppt that explains it further. Classes to incoporate: Create a class called Invoice that contains an array of InvoiceItems. The default number of items (and thus array elements) is 1. An invoice object can be viewed on the console as well as saved to a text file. Much of what is done for Case Study 1, part 2 can be used with some adaptation. The differences: The report functionality is now to be handled within this class. In addition to the array, the class will also contain a customerName and dateOfSsale. The class will also contain a subtotal (formerly the total of the items), a salesTaxAmount (at 5%), and a grandTotal. These will be incorporated into the report. Create a class called ProductInfo which contains an item number, a description, and a unit cost. This class will be used to fill-in values for InvoiceItem object data members based on the item number. Once the item number is supplied, the program will look up the description and unit cost associated that item number. Changes to InvoiceItem class: New data member: extendedCost - formerly item total (the product of quantityPurchased and unitCost). Instead of a testing program, you are to design and code a program that can be used by a user to create invoices. The user will enter how many invoice items to be entered. For each invoice item, the user will input the item number and the quantity of the product and the computer will fill in the rest and calculate the extended cost for the item. After all items have been entered, the computer will display the invoice report on the console as well as save the report to a .txt file. Make sure that you give proper instructions to the user and validate values that are entered, allowing for recovery. Files to be handed in: InvoiceGenerator_YourLastName.cpp InvoiceItem.h and InvoiceItem.cpp Invoice.h and Invoice.cpp ProductInfo.h and ProductInfo.cpp As usual programming style, formatting and commenting will be part of the grade. And also let me just briefly go over what the program as a whole needs to do: There will be a text file that will be a data file that will contain items from a hardware store (with appropriate names and fields). This text file will be processed within the program and when the user starts the program, they will be presented with a catalogue (The data from the text file that will be properly formatted in a table with appropriate headings for the user to see). The user will be prompted to pick an item (using the item id or code). Then they will be prompted to select how many of that product they want (quantity). Then it will ask the user if they would like to add a different product and if not, the program will return a formatted invoice with appropriate fields. All dollar amounts should be formatted as currency. The product code should be in the format [Letter][Number][Number][Number][Number]. The product names will not include spaces. The catalog will have the following fields: Product Code, Description, Unit Cost. The invoice report will say "INVOICE REPORT" in the top center. Under it, it will have the date. Under it, on the left it will say "Customer:[customer name]". The program will ask for the name in the beginning. The Invoice Report will contain the following fields: Item Number (code), Item Description (Name), Quantity Purchased, Unit Cost, Extended Cost. Under the items after a bold like across, it will say the subtotal, calculated tax (5%), and Total. Functional requirements for the class Invoice: -date: string -customer: string -orderItems: InvoiceItem[1..*] -subtotal: double -taxAmt: double -grandTotal: double -taxRate: double createInvoice() displayInvoice() fileInvoice() -calculateSubtotal() -calculateTaxAmt() -calculateGrandTotal() setTaxRate(double) Functional Requirements: class InvoiceItem -itemNumber: string -description: string -unitCost: double -quantity: unsigned int -extCost: double -catalog: ProductInfo[1..*] createInvoiceItem() formatInvoiceItem() -setItemNumber(string) -setDescription(string) -setUnitCost(double) -setQuantioty(double) -calculateExtCost() setCatalog() formatCatalog() Functional Requirements class ProductInfo -itemNumber: string -description: string -unitCost: double setProductInfo() formatProductInfo() Function Calling Hierarchy: main --> Create Invoice(class Invoice) --> Set Catalog(class Invoice Item) --> Set Product Info(class ProductInfo) main --> Create Invoice(class Invoice) --> Create Invoice Item(class InvoiceItem) --> Format Product Info(class ProductInfo) main --> Display Invoice(class Invoice) -->Format Invoice Item(class InvoiceItem) main --> File Invoice(class Invoice) --> Format Invoice Item(class Invoice Item)
Answered 3 days AfterMar 06, 2023

Answer To: This is my half-done assignment. I need it working using regular MS Visual Studio and using std. I...

Nidhi answered on Mar 08 2023
52 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here