Problem

Order StatusThe Middletown Wire Company sells spools of copper wiring for $100 each. The n...

Order Status

The Middletown Wire Company sells spools of copper wiring for $100 each. The normal delivery charge is $10 per spool. Rush delivery costs $15 per spool. Create an application that displays the status of an order. The status should include the following:

• The number of spools ready to ship

• The number of spools on back order

• The shipping and handling charges

• The total amount due

The application’s form should resemble the one shown in Figure 1.

Figure 1 Order Status form

The user should enter the number of spools ordered into the text box, and check the Rush Delivery check box if rush delivery is desired. When the Calculate Total button is clicked, an input box should appear asking the user to enter the number of spools currently in stock. If the user has ordered more spools than are in stock, a portion of the order is back-ordered. For example, if the user orders 200 spools and there are only 150 spools in stock, then 150 spools are ready to ship and 50 spools are back-ordered.

The application should have the following functions, called from the Calculate Total button’s Click event handler:

GetlnStock  Displays an input box asking the user to enter the number of spools in stock. The function should return the value entered by the user.

ReadyToShip  Accepts the following arguments: the number of spools in stock and the number of spools ordered. The function returns the number of spools ready to ship.

Backordered  Accepts the following arguments: the number of spools in stock and the number of spools ordered. The function returns the number of spools on back order. If no spools are on back order, it returns 0.

ShippingCharges  Accepts the following arguments: the number of spools ready to ship and the per-spool shipping charges. The function returns the total shipping and handling charges.

The application should have the following procedures, called from the Clear Form button’s Click event handler:

ResetSpools  Clears the text box and the check box.

Reset Delivery  Clears the labels that display the delivery information

Input Validation: Do not accept orders for less than one spool.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT