Must be in C#:
I will not be submitting this work as my own work. I just want help with the problem. This problem has already been submitted and I have done poorly on it and I would like someone to help me do it properly so that I know what to do for future assignments along these lines.
For today’s lab you will be creating a basic inventory system. The inventory system will be for a DVD store. You will have to make a DVD class that has fields to hold a title (string), a price (decimal), and a rating (float).
Your program will connect to the database, that you either set-up in the Database class or by following the directions above, and select 20 DVD’s from the dvd table. The data that is returned from the database will have to be converted into DVD objects that should be placed into a List of DVD’s that will serve as the inventory. The program requires a second list to serve as a shopping cart for the user.
The user will be presented with a menu with the following options: View inventory – displays all of the DVD’s in the store’s inventory. View shopping cart – displays all of the DVD’s in the user’s shopping cart. Add DVD to shopping cart – present the user with a list of DVD’s in the inventory and allow her/him to select one to add to the shopping cart (this removes it from the inventory). Remove DVD from shopping cart – present the user with a list of DVD’s in the shopping cart and allow her/him to select one to remove from the shopping cart (this adds the DVD back into the inventory). Exit – exit the program.
Use the following guidelines for this application:
DVD class created
Requires the following fields:
.Title of type string
Price of type decimal
Rating of type float
Should override ToString() to display the DVD’s Title, Price, and Rating.
list of DVD’s called inventory at the top of main
list of DVD’s called shoppingCart below the inventory list
Use file I/O to read in the server’s ip address Because this will be helpful in VFW the file should be:
the only thing in the file should be the ip address of the server (ex. “192.168.1.1”).)
Connects to the database
Executes a query to get the info for 20 DVD’s from the dvd table. The following information must be a part of the query
Query results converted to DVD objects and placed in the inventory list.
The following menu functionality should be implemented:
View inventory – list all of the DVD’s in the store’s inventory
View shopping cart – list all of the DVD’s in the shopping cart
Add DVD to cart – user input used to select a DVD to remove from the inventory and add that same DVD object to the shopping cart.
Remove DVD from cart – user input used to select a DVD to remove from the shopping cart and add that same DVD object to the inventory.
Exit – allow the user to quit the program.
The program will continue to run until the user chooses to exit.
All input must be validated
The user must not be able to crash your program
The user should be able to make selections on the main menu by number 1/2/3 or by typing out the option (ex. “view inventory”).
All string comparisons should be case insensitive.
Go back through your code and check for the following:
All variables and methods are named appropriately.
Any information being output to the user should be clear and concise.
The user should be clearly informed of what is occurring throughout the application. When values change or objects are instantiated information about this occurrence should be displayed.
Make sure nothing accesses an object that doesn’t exist.