Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Combined Programming Challenges of 7 through 9 Design an application that will include a form that will offer the choices to add, update or display

Combined Programming Challenges of 7 through 9

Design an application that will include a form that will offer the choices to add, update or display Inventory items. Note the change: The text book only asks you to add and display to the Inventory collection). You can display the choices as either menu options or buttons on the form. If the user wishes to Update, he can modify values of any property except the InvNumber property. If the user wishes to display or update existing inventory items, he should enter the InvNumber that can be used to pull existing data. If that particular InvNumber does not exist in the collection, the user should be notified that the InvNumber does not exist.

You are to read from and write to text files in the assignment. When you run the application, the collection of Inventory objects should be populated using the text file. You are to create a text file named Inventory.txt that will initially have data for 5 Inventory items. Data stored in the text file should be meaningful. Read the data from the text file into the collection and then use the form to add new items to the collection, update or display existing items. You will also include on the form the choice to save the existing contents from the collection to the Inventory.txt file. Also include a check to see that if a form is closed or exited from (in other words, if the user closes the form and tries to exit without clicking on the Exit button or Exit menu option), the program will check to see if any new changes have been made to the Collection since the last save and if so, save the changes to the text file before the form is closed or exited from. You are to design the form independently and make sure that the interface is as user friendly as possible.

  • 7. Inventory Class

    Create an application that stores inventory records for a retail store. The application should have an Inventory class with the following properties:

    InvNumber: A string used to hold an inventory number. Each item in the inventory should have a unique inventory number.
    Description: A string that holds a brief description of the item.
    Cost: A decimal value that holds the amount that the retail store paid for the item.
    Retail: A decimal value that holds the retail price for the item.
    OnHand: An integer value that holds the number of items on hand. This value cannot be less than 0.

    The application should store Inventory class objects in a collection. Create an input form in the application that allows users to input new inventory items to be added to the collection. The user should also be able to look up items by their inventory number.

  • 8. Inventory Class Modification

    Modify the application you created in Programming Challenge 7 so it saves the contents of the collection to a file. When the application starts up, it should load the data from the file into the collection. Be sure to use exception handling.

  • 9. Cash Register

    Create an application that serves as a simple cash register for a retail store. Use the Inventory class you created in Programming Challenge 7 to store data about the items in the stores inventory. When the application starts up, it should load the entire stores inventory from a file into a collection of Inventory objects.

    When a purchase is made, the cashier should select an item from a list box. (If an items OnHand property is set to zero, the item should not be available in the list box.) The items description, retail price, and number of units on hand should be displayed on the form when selected. The cashier should enter the quantity being purchased, and the application should display the sales tax and the total of the sale. (The quantity being purchased cannot exceed the number of units on hand.) The quantity being purchased should be subtracted from the items OnHand property. When the application ends, the contents of the collection should be saved to the file.

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

Students also viewed these Databases questions

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago