Purchase Solution

Visual Basic Programming

Not what you're looking for?

Ask Custom Question

(Average Calculator Application) Write an application that takes three numbers as input in TextBoxes, stores the three integers in variables, then calculates and displays the average of the numbers. The output is displayed in a Label. Figure 3.33 shows the completed application.

Fig. 3.33. Result of Average Calculator application.

Creating the Application: Create a new Windows Forms application named AverageCalculator. Rename its Form1.vb file as AverageCalculator.vb. Set the Form's Font property to Segoe UI 9pt and its Text propertyto AverageCalculator.

Coding the Click event handler: Perform the average calculation in the Calculate Button's Click event handler. Display the average in the resultLabel.

Clearing the result: Write event handlers for the TextBoxes' TextChanged events. Write code to clear resultLabel after the user enters new input into any of the TextBoxes.

Running the application: Select Debug > Start Debugging to run your application. Enter three integers, then verify that the average is calculated properly.

Attachments
Purchase this Solution

Solution Summary

A complete VB.NET project. The program will validate that the user has entered valid integer numbers, then it will sum them up and divide by total number of integers to get the average value. Result is displayed on the form in a label control.

Solution Preview

Attached is the complete VB project per task requirements. The executable can be found ...

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Excel Introductory Quiz

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

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

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.