Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* VISUAL BASIC * Write a program that will calculate the cost of donut orders for a fundraising event. The user is to be prompted
VISUAL BASIC Write a program that will calculate the cost of donut orders for a fundraising event. The user is to be prompted using
textboxes to enter their name in lastNamecommafirstName format number of glazed donut boxes dozen and
number of chocolatecovered donut boxes dozen Both number of donut textboxes should contain initially.
Your program should display using a listbox the name, invoice number, glazed subtotal, chocolatecovered subtotal,
and total order cost. The subtotals and total should formatted to currency.
You should also display a label showing the total number of donuts sold to all customers. The total donuts should be
set as a class variable. The initial value for this should be After successfully processing an order, the total donuts
sold for the customer boxes should be added to the total donuts class variable and the label updated.
Donut prices are set as follows:
Regular Glazed Box dozen $
Chocolate Glazed Box dozen $
For each order each time Calculate Cost is clicked an invoice number needs to be generated. The format of this
number is:
First two letters of the first name Upper Case
First two letters of the last name Upper Case
Hyphen dashminus
Current order number
o Note: Order number should be set as a class variable. The initial value for the first order should be
After successfully processing an order, the order number should be incremented by
Hyphen dashminus
Total number of boxes for this customer
Your program should have three button events. These should perform the following tasks:
Calculate Cost perform the calculations and display the following output as shown below:
Clear Form clear the name, reset glazed and choc textboxes to clear the listbox, and set the focus to the
first textbox
Exit end the program
note: the first order number is and increases by for each successful order. Order number should not
increase until order is calculated and output to the user
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started