Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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),

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 $900

oIf the customer spends at leas ta 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 inputs

You need to think whether any parameter in any Function/Sub should be by Ref and, if yes, which one(s).

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 returns True 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.

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago