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

  Create an interface called player

Create an interface called Player. The interface has an abstract method called play() that shows a message describing the meaning of "play" to the class.

  The menu is displayed and the user must select

The menu is displayed and the user must select an option (a number between 0 and 7). The action corresponding to the selection is performed, then the menu is displayed again and the user can choose another option.

  Generates n random numbers

Create a VI that generates n random numbers, where n is a user input. Display the n random numbers in an array, and in a second array display the same random umbers in ascending order.

  Design a java application to read a file containing data

Design a Java application that will read a file containing data related to the passengers on the Titanic. The description of the file is shown below. The application should provide statistical results on the passengers including

  Program that allows two players to play tic-tac-toe

Implement a program that allows two players to play tic-tac-toe. Draw the game grid and an indication of whose turn it is (X or O). Upon the next click, check that the mouse click falls into an empty location,

  Concept of operator overloading

This lab is to introduce students to the concept of operator overloading as member functions of a class. This will be done in the context of creating a class that will perform four basic mathematical operations on complex numbers

  How would i fix the decimal error program below

How would I fix the decimal error program below

  What are the various types of dns servers and their purpose

question 1 what is the role of dns how is it structured and why it is necessary?question 2 what are the different kinds

  What value is assigned to the variable phrase

Create a class State with five properties to hold the information about a single state and a method that calculates the density (people per square mile) of the state.

  How to count number of objects (instances) created

How to count number of objects (instances) Created, use java code and please be descriptive

  Write a java program that draws a square abcd

Write a java program that draws a square ABCD. The points A and B are arbitrarily specified by the user by clicking the mouse button. The orientation of the points should be counter-clockwise.

  Program that computes and prints the value of 6!/5! using

Write a Java program that computes and prints the  value of 6!/5! using Scanner.

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