Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C#:I need someone to help me with this problem. If you can't finish it all that's fine. I will take it as long as it

C#:I need someone to help me with this problem. If you can't finish it all that's fine. I will take it as long as it has most of the functionality of the assignment.

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 create 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 DVDs 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 DVDs 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 DVDs in the stores inventory. View shopping cart - displays all of the DVDs in the users shopping cart. Add DVD to shopping cart - present the user with a list of DVDs 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 DVDs 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 to complete this application:

Classes/Variables

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 DVDs Title, Price, and Rating.

list of DVDs called inventory at the top of main

list of DVDs called shoppingCart below the inventory list

Database

I can do this step. Do not worry about doing file I/O(Use file I/O to read in the servers ip address Because this will be helpful in VFW the file should be:

c:/VFW/connection.txt

the only thing in the file should be the ip address of the server (ex. 192.168.1.1).)

Connects to the database

(For this query, you can just fill it in with words that seem correct. I can replace it with the real words.)Executes a query to get the info for 20 DVDs from the dvd table. The following information must be a part of the query

DVD_Title

Price

publicRating

Query results converted to DVD objects and placed in the inventory list.

Menu

The following menu functionality should be implemented:

View inventory - list all of the DVDs in the stores inventory

View shopping cart - list all of the DVDs 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.

Input Validation

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.

Extra Information

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 doesnt exist.

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

=+j Explain the relationship between unions and MNEs.

Answered: 1 week ago