Question: VISUAL BASIC Write a program that produces an invoice form for a furniture manufacturer. The inputs taken by the program are the customer name(last name,
VISUAL BASIC
Write a program that produces an invoice form for a furniture manufacturer. The inputs taken by the program are the customer name(last name, first name), the address, the city, state and zip-code, how many chairs are ordered and how many sofas are ordered. When the button Process is clicked, the program should take-in the inputs, generate the Invoice Number (read below for details), compute the total price and show all the information, with the final amount, in the list-box(see picture).When the button Clear Order is clicked, all the text-boxes and list-box should be cleared. When the button Quit is clicked, the program should close.Programs details:-The invoice number should be generated by taking the first three letters of the customers last name, converted to upper-case; and the last four digits of the zip-code. You can assume that the customer will always enter a proper last name first, and then the first name; you can also assume the last name is going to contain at least 3 letters. Additionally, you can assume the customer will enter the city, followed by the state, followed by the zip-code, as showed in the picture below.In other words, you can assume that the first 3 inputs will be correct and you do not need to check them.-Differently, your program needs to check that the inputs entered for chairs and sofas are two numbers. If not, the program should not take-in these two inputs, it should not proceed with the calculation and it should display a message to the user. If the inputs are correct, the program should take-in the numbers and proceed to the calculation of the total.-In calculating the total, the program should take into consideration the following:oThe price for a chair is $300, while the price or a sofa is $900oIf the customer spends at least a total$5000, she/he gets a discount of 10%.oAfter the total is computed and the discount applied (if needed), a5%sales tax is added to the amount the customer has to pay.oIn the list-box, the program should display the Invoice number, Name, Address, City, Chairs and Sofas (as showed in the picture below). And it should display the final amount should be displayed in the list-box, formatted as currency with 2 decimals.The program should be coded using Functions and Subs. Specifically, it should contain:-A Sub that creates the Invoice number, as specified above.-A Function to compute the total-A Sub to display the results in the list-box-A Function to check the numerical inputsYou need to think whether any parameter in any Function/Sub should be byRef and, if yes, which one(s).
NOTE: The list above contains the minimum number of Functions and/or Subs your program must have. Your program can then have as many Event Procedures as necessary. And you are free to add additionalFunctions/Subs than the ones listed above, if you think there are other parts of the program that could be coded with Functions or Subs.HINT: There are different ways to code the Function to check the numerical inputs. You could create a very generic Function that takes one parameter, checks whether it is numeric, and returnsTrue or False. Then, in your program, this Function should be called as many times as the number of inputs/text-boxes you need to check. Alternatively, you can create a Function that takes no parameters, and you code the function so to check that the text-boxes where the inputs are entered contain numbers; and returns True or False. Then, in your program, this Function would only be called once.

Order Form Customer Name Curie, Marie Invoice number: CUR5444 Name: Curie, Marie Address: 123 Programming Ave City: Minneapolis, MN, 55444 Chairs: 10 Sofas: 5 Address 123 Programming Ave City, State, Zip Minneapolis, MN, 55444 Final price: $7,087.50 Num. Chairs 10 Num. Sofas 5 Process Order Clear Order Quit Order Form Customer Name Curie, Marie Invoice number: CUR5444 Name: Curie, Marie Address: 123 Programming Ave City: Minneapolis, MN, 55444 Chairs: 10 Sofas: 5 Address 123 Programming Ave City, State, Zip Minneapolis, MN, 55444 Final price: $7,087.50 Num. Chairs 10 Num. Sofas 5 Process Order Clear Order Quit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
