Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This class is Visual Basics..... Follow the instructions below and implement them as listed. Name the variables and controls exactly as listed. We will create

This class is Visual Basics.....

Follow the instructions below and implement them as listed. Name the variables and controls exactly as listed.

We will create a Price calculator. The user will type a Price (a number more than 0) and enter number of units (a number more than or equal to 1) then click the total button. The Total "so far" is displayed to the screen. The user may repeat the process, to add more units and prices, repeatedly till they either Quit the application or hit the Reset button. Complete the following to accomplish this outcome:

Write code so when the user hits Total, the code:

gets the value from a Pricetxt textbox and assigns it to a variable named PriceSng using the Csng conversion. Ask questions in the Discussion if you do not know how to do this.

the code then checks that PriceSng is > 0, if not issue an error message "Enter positive numbers only". None of conditions or actions below should execute. Do not use Exit or Return statements. Use Elseif for code behavior to happen.

If the above check passes, then check that UnitsInt is more than or equal to 1, otherwise show an error message "Units must be more than 1". Again, None of conditions or actions below should execute. Do not use Exit or Return statements. Use Elseif for code behavior to happen.

The logic to calculate the accumulated Total is this: Create a global variable TotalSng in a Single type, and assign it to 0.0. Under the Total button, use this formula: x + (PriceSng*UnitsInt*(1+TaxRate) where x is the current Total, PriceSng is the current price and UnitsInt is the number of items of that price, and TaxRate is a constant assigned to the TaxRate in Los Angels represented as fraction, e.g. 0.09.

All messages shown must use messagebox.show, and nothing else.

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

3. How frequently do the assessments occur?

Answered: 1 week ago