Purchase Solution

How to write an application that allows the user to manipulate and enter numbers (Calculator)

Not what you're looking for?

Ask Custom Question

See the attached file.

(Arithmetic Calculator Application) Write an application that allows the user to enter a series of numbers and manipulate them. The application should provide users with the option of adding or multiplying the numbers. Users should enter each number in a TextBox. After entering each number, the user clicks a Button, and the number is inserted in a ListBox.

a. Copying the template to your working directory. Copy the directory:
C:ExamplesTutorial10ExercisesArithmeticCalculator to your C: SimplyVB2008 directory

b. Opening the application's template file. Double click ArithmeticCalculator.sln in the Ari thmeti cCal cul ator directory to open the application.

c. Adding a ListBox to display the entered numbers. Add a Li stBox. Place and size it

d. Creating an event handler for the Enter Button. Create the Cl i ck event handler forthe Enter Button. If the result of a previous calculation is displayed, this event handler should clear the result, clear the ListBox and disable the addition and multiplication Buttons. It should then insert the current number in the Operands list:
ListBox. When the ListBox contains at least two numbers, the event handler should then enable the addition and multiplication Buttons.

e. Summing the values in the ListBox. Define the Cl i ck event handler for the AddButton. This event handler should compute the sum of all the values in the Oper-ands list: ListBox and display the result in resultLabel .

f. Multiplying the values in the ListBox. Define the Cl i ck event handler for the Multiply Button. This event handler should compute the product of all the values in the Operands list: ListBox and display the result in resultLabel.

g. Running the application. Select Debug > Start Debugging to run your application. Enter two values, then click the Add and Multiply Buttons. Verify that the results displayed are correct. Also, make sure that the Add and Multiply Buttons are not enabled until two values have been entered. Enter a new value and verify that the previous result and the ListBox is cleared. Enter two more values, then click the Add and Multiply Buttons. Verify that the results displayed are correct.

h. Closing the application. Close your running application by clicking its close box.

i. Closing the IDE. Close the Visual Basic IDE by clicking its close box.

Attached is the file with the correct information.

Attachments
Purchase this Solution

Solution Summary

The solution assists with how to write an application that allows the user to manipulate and enter numbers.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Networking Questions

This quiz consists of some basic networking questions.