Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ClearlyVB2012Chap17- Page-398 exercise-3, Modify This: Open the designer and Code Editor windows. Modify the code so that it uses an independent Sub procedure (rather than

ClearlyVB2012\Chap17- Page-398 exercise-3, Modify This:

image text in transcribed

Open the designer and Code Editor windows. Modify the code so that it uses an independent Sub procedure (rather than a function) to calculate the new price. Save the solution and then start and test the application. Close the Code Editor window and then close the solution. Public Class frmMain 1 reference Private Function GetNewPrice (ByVal dblold As Double) As Double ' increases current price by 5% and returns new price Dim dblNew As Double dblNew = dblold * 1.05 Return dblNew End Function 0 references Private sub btnCalc_Click (sender As object, e As EventArgs) Handles btnCalc.click ' calls a function to calculate the new price ' and then displays the new price Dim dblPrice As Double Double. TryParse(txtcurrentPrice. Text, dblPrice) ' get the new price dblPrice = GetNewPrice (dblPrice) lblNewPrice. Text = dblPrice. ToString("C2")

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

Is there a clear hierarchy of points in my outline?

Answered: 1 week ago