Program to order a product from inventory, Visual Basic Programming

Assignment Help:

Write a program that permits the user to order a product from inventory. The user selects the product and enters the quantity. If there is sufficient quantity on hand of the product to fulfill the order:

1.  the price is retrieved from a product array,

2.  the cost (quantity * price) is calculated,

3.  the order information is displayed on the form,

4.  the quantity ordered is deducted from the inventory array,

5.  the order is written to an output file.

Otherwise, the user should be notified that there is an insufficient quantity on hand. The user must print preview the completed order (Product, Cost) before entering another order. And the user should not be able to print preview until an order has been processed. The user has the option to print preview a report (Product, Quantity on Hand, Price) of the current product inventory. The user ends the program by clicking exit. Download, unzip and run the executable Program 4 (Debug folder - right click and click "Open in New Window") to see what the interface could look like and what the functionality should be. There are two files included with the executable. Open (double click on the file name) the Products.txt before you run the program and the OrdersFile.txt files after you running the program and generating a few orders.

This program incorporates concepts and statements from all chapters but primarily from chapters 8 and 9.

Remove a product from BOTH the ProductRecord array and the product ListBox that is sold out (quantity = 0). Hint: Use concepts from the Bubble Sort (in Handouts) to remove a product from the inventory array.

Back your program up by making a copy of it on another device at the conclusion of each Visual Basic session.  Programs lost due to computer crashes or lost/broken jump drives that are submitted late will result in point deductions!  To back up the program, go to Windows Explorer and copy / paste the solution folder (the highest level folder where you see your program name) onto another device.  Do NOT do a FILE SAVE AS to save the program on another device as this will not copy all of the files that belong to the solution.

Requirements:

  • Name the folder/program using your initials and last name and program number, e.g., SmithCRProgram1 where a student's last name is Smith and initials are C.R.
  • Follow naming conventions for controls, constants and variables given in the book, i.e., use the appropriate prefixes to indicate type of control, data type of constants and variables, and scope of variables.
  • Follow documentation recommendations as demonstrated in the Test Scores program.
  • Begin all programs with your name, program number and program summary.
  • On the fourth Tab from the left edge, document the algorithm above the related line.
  • Include procedure headers as demonstrated in the Test Scores program.
  • Use asterisks for event procedure headers.
  • Use hyphens for any general procedure headers that you may include.
  • Follow code indentation conventions.
  • Incorporate design principles and user-friendly features into your interface.
  • Set the form's StartPosition property value to CenterScreen.
  • Set the form's Width property no larger than 400; the Height property no larger than 400 with your screen resolution set to 800 x 600 pixels.
  • Create and store in the bin/Debug folder of your project a sequential-access text file in Notepad containing the following data with one field per row:

Product                    Quantity          Price

A45                      2                 4.50

B24                      5                  2.40

C12                      3                  7.50

D78                      4                  8.20

E45                       6                  3.10

  • Define a ProductRecord structure that contains fields for Product, Quantity on Hand and Price. Declare and use an array of the ProductRecord structure to process orders. Read the data for the array in from the sequential-access text file in the form's Load event procedure.
  • Use a ListBox for the products. These products must be added from the array at the runtime. Do this in the form's Load event procedure.
  • Use a ComboBox to display the range of quantities. If you think that it would be fun, you may want to try to use NumericUpDown control (see Help) for entering the quantity instead of a ComboBox!
  • The product's price must be retrieved from the array.
  • In the Order button's Click event procedure, write the product number and cost to a sequential-access text file. You will have to close the file at the end of the procedure so that it can be reopened for the next order.
  • Use the button's .Enabled property to prevent the user from print previewing before ordering and not ordering again until the order has been print previewed.
  • Read Chapter 9 Discussion and the Chap9Movies program available for download in the discussion to learn how to print preview. You may use Chap9Movies as a model for printing the order and report in this program.
  • Include ToolTips for the Buttons.
  • Set Option Strict to On. Let Option Explicit stay set to On (default).
  • Declare and use variables declared at the appropriate scope and of the appropriate data type to store the results of the calculations prior to displaying them.
  • Use a Try Catch block to catch exceptions. Display appropriate error message(s).

Related Discussions:- Program to order a product from inventory

Help, i need code for assignment problem of operational research in vb

i need code for assignment problem of operational research in vb

Properties - intrinsic control, Properties: Every control has a defaul...

Properties: Every control has a default property related with it. The default property does not require to be named when you are functioning. The control Check box as value

Deleting handlers with class wizard, Deleting Handlers With Class Wizard: ...

Deleting Handlers With Class Wizard: The handler can be deleted by using the class wizard. The class wizard will delete the prototype and message map entry. The user should ma

Explain dtd elements and dtd attributes, Problem 1. Describe the concep...

Problem 1. Describe the concept of exception in .Net environment 2. Explain the process of adding, updating and deleting records with an example 3. Explain DTD elements a

Message routing - visual basic, Message Routing: The system posts the ...

Message Routing: The system posts the messages to a first-in, first-out queue known as the message queue or it sends the messages directly to a window procedure. The Messages

Create a vb application to make the text bold, Question 1 Create a VB appl...

Question 1 Create a VB application to make the text bold, italic, underlined and also color the text (using checkbox, option button, textbox controls) Question 2 Create a

Do loops, You can employ Do...Loop statements to run a block of statements ...

You can employ Do...Loop statements to run a block of statements indefinite number of times. The statements are repeated either whilst a condition is True or till a condition becom

Creating an order entry and editing application , Assume you are creating a...

Assume you are creating an order entry and editing application for a book store. An order consists of a product, quantity, total price, payment type including Credit/Debit card acc

Investment loan program, I have all my program done except the loan part th...

I have all my program done except the loan part that I am having a lot of troubles with

What is the method of creating a new project in vb.sss, Visual Basic 1....

Visual Basic 1. What is the method of creating a new project in VB.SSS 2. Illustrate Code Editor Window and Solution Explorer. 3. Write a VB program to sort and display a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd