NEED CODE IN C# ( C SHARP)
Note: Create Properties/Getters and Setters as needed andprovide proper feedback and messages to the user after eachoperation1. Create a Product class, that maintains the followinginformation:Code, stringName, stringPrice, doubleQtyInStock, integer
2. Create an Inventory class, that uses a Dictionary toimplement the following operations (use product Code as the key,Product object as the value):Add a new product to inventorySearch a product using product code.Update qtyInStock and price of the productDisplay all the products in inventory
3. Create an InvoiceItem class. For each InvoiceItem in theinvoice, it has the following:Product, ProductQty, integerGetSubtotal() returns double(it is the multiplication of quantitysold and unit price)
4. Create an Invoice class that uses a HashSet that holdsInvoiceItems. Implement the following operations for the Invoice orBill of Sale:Add an Invoiceitem to the invoice, should be unique i.e. sameproduct cannot appear more than once along with quantity sold. Onlythe product in the inventory can be added to the invoice. All the informationabout the product is used from inventory. This means the user isonly providing the item and quantity data.Display all the products sold along with the total of the invoice.The invoice total is the total of all the subtotal.
5. Do the following in the main method:a) Create an Inventory objectb) Add 5 instances of Product objects to the Inventoryobject.c) Print all products in the Inventoryd) Create an Invoicee) Create 3 instances of InvoiceItem using 3 instances of Productfrom the inventory retrieved by the Product Code.f) Add the above 3 InvoiceItem to the Invoice. Test if you can addthe same product twice as a part of two separate InvoiceItem. Theapplication should not allow this.g) Print the invoice, showing the subtotal and grand total.
NEED CODE IN C# ( C SHARP) Note: Create Properties/Getters and Setters as needed and provide proper feedback and message
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am