Answered step by step
Verified Expert Solution
Link Copied!

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 lastName[comma]firstName format), number of glazed donut boxes (1 dozen), and
number of chocolate-covered donut boxes (1 dozen). Both number of donut textboxes should contain 0 initially.
Your program should display (using a listbox) the name, invoice number, glazed subtotal, chocolate-covered 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 0. After successfully processing an order, the total donuts
sold for the customer (boxes *12) should be added to the total donuts class variable and the label updated.
Donut prices are set as follows:
- Regular Glazed Box (1 dozen)- $6
- Chocolate Glazed Box (1 dozen)- $7
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 (dash/minus)-
- Current order number
o (Note: Order number should be set as a class variable. The initial value for the first order should be
100. After successfully processing an order, the order number should be incremented by 1.)
- Hyphen (dash/minus)-
- 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 0, clear the listbox, and set the focus to the
first textbox).
- Exit (end the program).
*note: the first order number is 100 and increases by 1 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

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions