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

  Your project as a programming consultant is to create a

your project as a programming consultant is to create a program that develops an amortization schedule.nbsp your

  Code that assigns true to isamember

write code that assigns true to isAMember if the value of memberID can be found in currentMembers , and that assigns false to isAMember otherwise. Use only k , currentMembers , memberID , and isAMember

  What challenges in planning solution for programming problem

what are the three biggest challenges in planning and designing a solution for a programming problem? What can you do to overcome these challenges? How would you apply these techniques to the programs in this class?

  The sixth amendment allows the due process right to council

The Sixth Amendment allows the due process right to council. Several Supreme Court cases have clarified this right for those who cannot afford their own attorneys. Discuss the right to an attorney for indigent defendants. What are the three main syst..

  Write down the java code for the bank

Write down the java code for the bank of Fraud. User is presented with menu which looks something like this: 1. Deposit 2. Withdrawal 3. Check Balance 4. Exit.

  Quadratic that solves quadratic equations

Write a method called quadratic that solves quadratic equations and prints their roots. Recall that a quadratic equation is a polynomial equation in terms of a variable x of the form ax2 + bx + c = 0. The formula for solving a quadratic equation is ?..

  List various bindings that are needed to determine semantics

List the various bindings that are required to determine the semantics when the statement is executed. For each binding, indicate the binding time used for the language.

  Develop view for order number and order total in file

Develop a view named OrdTot. It comprises of order number and order total for each order currently on file. Order total is the sum of number ordered.

  What is overloading and what is overriding

What is overloading and what is overriding? Please use code to explain it.

  The class overloaded constructor receives a 2-dim int array

The class overloaded constructor receives a 2-dim int array as a parameter and assigns its values to a private 2-dim int array. Have another method that prints the whole 2-dim table.

  Write following java expressions in mathematical notation

Write the following Java expressions in mathematical notation.

  Write a java program that can serve as a simple calculator.

Write a Java program that can serve as a simple calculator. This calculator keeps track of a single number (of type double) that is called result and that starts out as 0.0.

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