Creating an event handler for the enter button

Assignment Help JAVA Programming
Reference no: EM13945649

(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.

Attachment:- Tutorial10.zip

Reference no: EM13945649

Questions Cloud

What implications would make for age of the sandstone : Zircon crystals formed when a granite magma crystallised. Since then, geological processes have caused some of these crystals to end up with grains in a sandstone. What sequence of events would account for this?
A lobbyist presenting to a policy-making body : In this assignment, you are a lobbyist presenting to a policy-making body that will use the information to allocate resources and shape regulations aimed at this component of the health care continuum.
What benefits and advantages does it bring to business : Why IT is important for business survival? What is required to apply IT into business? How can business maintain and monitor IT? What benefits and advantages does IT bring to business?
What is the projection for next year inventory : Use the "percent of sales method" of preparing pro forma financial statements to determine the projection for next year's inventory. Make the following assumptions: current year's sales are $24,500,000; current year's cost of goods sold is $15,925..
Creating an event handler for the enter button : 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.
What are the three categories of sedimentary rocks : What are the three categories of sedimentary rocks? What are the distinguishing characteristics between the three categories of rocks?
To prepare for the examination of financing sources : To prepare for the examination of financing sources, write a two to three page (not including the title and reference pages) Executive Summary for a Business Plan. This process involves the describing the market, describing your capital needs as w..
How do the minerals common in rocks and sediments reflect : How do the minerals common in rocks and sediments reflect or respond to the changing conditions? How might the apparent rock ages determined by radioactive dating methods be established or altered in the various environments?
What is the probability that at least half of the room : What is the probability that at least half of the rooms are occupied on a given day?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Kinds of functionality in the graphical sense

You have to be familiar with the "Fun" part of Java utilizing the GUI. - Why do you think Java and Java's GUI are so popular?

  Calculator to indicate sale prices when he marks items down

A retailer would like a calculator to indicate sale prices when he marks items down at various percentages.

  Create a class named date that stores date values

Create a class named Date that stores date values

  Button to increase or decrease the number of the balls

Simulates a bouncing ball. Extend to allow mulitple balls. You can use the +I or -I button to increase or decrease the number of the balls and use teh Suspend and Resume buttoms to freeze the balls or resume bouncing. For each ball, assign a random c..

  Explain the inventory program to include an add button

Modify the Inventory Program to include an add button, a delete button, and a modify button on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock

  This project is for designing and developing a college

this project is for designing and developing a college registration program. prepare a java program to register

  Design and construct a computer program

Design and construct a computer program in one of the approved languages (C, C++, Java, Pascal, etc.) that will illustrate the use of a third-order explicit Runge-Kutta method of your own design.

  Which method will a web browser call on a new applet

Which method will a web browser call on a new applet? What would happen if "String[]args" is not included as argument in the main method

  Java program to compare two variables if they are equal

Write down program which will ask user to initialize two character arrays, program must compare two variables if they are equal.

  Write a function that searches a [n][n] matrix

there is a y or multiple y values with a blank on one side (left/right or top bottom) and a x on the other

  Elements in a two-dimensional array

Write a value-returning method that returns the number of columns with n elements in a two-dimensional array of chars, where n is a parameter of the method. Include code to test your method.

  Discuss the legal ramifications of the division of condo

Discuss the legal ramifications of the division of condo, BioTech and other assets. Would it make any difference if Violet sold the property after filing for the dissolution of marriage?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd