Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

VISUAL BASIC PROGRAMMING: SALE PRICE CALCULATOR 3. You are to write a program that takes a price for an item and a discount (entered


image text in transcribed
image text in transcribed

VISUAL BASIC PROGRAMMING: SALE PRICE CALCULATOR 3. You are to write a program that takes a price for an item and a discount (entered as a percentage from 0.01 for a 1% percent discount to 0.99 for a 99% discount). When the user presses the "Calculate Sale Price" button, the program will first run a boolean, Function to determine if the value entered for the retail price and the discount percentage are correct. You will use TryParse to determine if each value entered is an acceptable decimal number, and then assign the value to its variable. These variables must be declared globally as they will be used in more than one function or procedure. If either of the values cannot be parsed, then the function should show an error message in the output label. This function has no input parameters. Sale Price Calculator Retail Price Discount Percentage Sale Price COD Calculate Sale Price Ext Once the values have been entered (the Boolean function returns TRUE), the program will then run a function to determine and return the sale price. The function will send as arguments the retail price and the discount rate, and will return the sale price. Possibility 1: Missing discount rate Sale Price Calculat Retail Price Discount Percentage Sale Price $5.00 . Sale Price Calcu Retail Price Discount Percentage Sale Price 500 Calculate Sale Price Discount percentage must be numar Calculate Sale Price Possibility 2: Missing retail price Sale Price Calculator Retail Price Discount Percentage 10 Sale Price Calculate Sale Price Exit Possibility 3: Inputs are correct Sale Price Calculator Retail Price 85.00 Discount Percentage 10 Sale Price Retail price must be numeric x Sale Price Calculator Retail Price Discount Percentage Sale Price Retail price must be numeric Calculate Sale Price I Sale Price Calculator 10 Retail Price 85.00 Discount Percentage 10 Sale Price $76.50 Ext Calculate Sale Price Ext Calculate Sale Price Exit

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

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions