1. Engineering
  2. Computer Science
  3. visual basic summary in this assignment you create a program...

Question: visual basic summary in this assignment you create a program...

Question details

Visual Basic:

Summary: In this assignment you create a program to convert feet and inches to meter. The conversion is done with a function you write in the program and then call it.

Input data:

Feet: User enters a number for feet  

Period: User enters a number for inches


Create a new project and name it as yourlastname-firstname-Assignment4. Save this project in VB folder you created earlier.

Change form’s title to: Your full nameAssignment 4 - Conversion.

Form contains four Labels, two TextBoxes, and three Button controls.

Use labels to identify Feet, Inches and Meters. See below Form Layout with Controls for more details. Note: You will use the same control Names shown below.

- Input variables:

Feet (Single)

Inches (Single)

- Output variables:

Meters (Single)

To convert feet and inches to meters, use this formula: (feet * 12 + inches) * 0.0254. 0.0254 is a constant value to convert English system to Metric. Make sure to declare a Constant for this literal number.

You construct a Function for this conversion. It will be placed after End Sub for btnConvert_Click.

Start the Function code with typing Function keyword, followed by the function name, followed by parameters, followed by function type.

This Function has two parameters; feet and inches. See below for suggested program's infrastructure.

Items to note:.

Variables names must follow the conventions and rules explained earlier and must have proper data type for the values that will be stored in them.

Appearance of the form is very important; Make sure that your design is clean; Spelling is important.

Clear button, clears TextBoxes and Label control that displays Meters.

Exit button, closes the Form.

You will write the code for the three buttons.

Avoid double-clicking on TextBox and Label Controls to create unnecessary code. If you do, please delete them.

Run the program, enter values for Feet and Inches, then click Convert button, to see the Meters equivalent displays in the Label control. See example for the complete program below.

Write a simple program

Your Name-Assignment 4-Conversion Feet Inches txtFeet ーーーーヤ txtlnches Meters lblMeters Convert Clear Exit btnConvert btnClear btnExit

疆 Your Name - Assignment 4 -...- x Feet Inches 10 Meters1.778 Convert Clear Exit

Function Form 1 1 reference EPublic Class Form1 0 references Private Sub btnconvert_click(sender As object, e As EventArgs) Handles btnconvert.click End Sub O references Function ConvertEngToMetric(ByVal sngFeet As Single, ByVal sngInches As Single) As Single End Function End Class

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution