Interface And Visual Basic Programming

PAGES
3
WORDS
601
Cite
Related Topics:

Visual Basic Programming and Interface The Interface of Average Score Solution

Code

Public Class Form

Private Sub-Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' calcualtes and displays the average solution ' declare variables

Dim intAllen As Integer

Dim intPeter As Integer

Dim intSmith As Integer

Dim intJohn As Integer

Dim intAverage As Integer

'assign input to variables

Integer.TryParse (txtAllen.Text, intAllen)

Integer.TryParse (txtPeter.Text, intPeter)

Integer.TryParse (txtSmith.Text, intSmith)

Integer.TryParse (txtJohn.Text, intJohn)

' caculate average intAverage = (intAllen + intPeter + intSmith + intJohn) / 4

' display average lblAverage.Text = intAverage.ToString ("CO")

End Sub

End Class

Chapter 7: Question 8.

Code

Public Class Form1

Private Sub-Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' calcualtes and displays the total sales ' declare variables

Dim intPeter As Integer

Dim intAllen As Integer

Dim intSmith As Integer

Dim intHelen As Integer

Dim intTotal As Integer

'assign input to variables

Integer.TryParse (txtPeter.Text, intPeter)

Integer.TryParse (txtAllen.Text, intAllen)

Integer.TryParse (txtSmith.Text, intSmith)

Integer.TryParse (txtHelen.Text, intHelen)

' caculate total sales intTotal = (intPeter + intAllen + intSmith + intHelen)

' display total sales lblTotal.Text = intTotal.ToString ("CO")

End Sub

End Class

Chapter 8: Exercises 10

Output: Calculate the food's fat calories and its fat percentage

Processing: Calories

Input: Food's fat grams

Number of calories

Each...

...

"calculate the fat percentage by dividing the food's fat calories by its total calories and then multiplying the result by 100" (Zak, 2014 p 183).
4. if fat percentage display with the zero decimal places

End if

5. display the fat calories

Display the fat percentages

Code

Public Class Form1

Private Sub-Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' calculates the food fat calories and its fat percentage

Const gram As = 9

Dim intCalories As Integer

Dim decpercentage As Decimal

' assign gram, calories and price to variables

Integer.TryParse (txtGram.Text, intGram)

Integer.TryParse (txtFat.Text, intFat)

Integer.TryParse (txtCalories.Text, intCalories)

Decimal.TryParse (txtPercentage.Text, decpercentage)

' calculate fat percentage the food's fat calories / total calories * 100

intCalories = intGram * 9

intPercentange = intCalories / intCalories x 100

' display fat percentage ' display calories

End Sub

End Class

Chapter 8: Exercises 13

Output: employee net pay

Input: hours worked rate of pay

Algorithm:

1.enter hourly worked per week

2 enter rate of pay

3. employees are not allowed to work more than 40 hours a week

5. calculate gross pay

6. calculate FWT (federal withholding tax), which is 20% of gross pay

7. calculate FICA (Social Security & Medical Tax), which is 8% of gross pay

8.calculate state income tax, which is 2% of gross pay

9. calculate an net pay= gross pay - ( FWT +FICA…

Sources Used in Documents:

Reference

Zak, D. (2014). Clearly Visual Basic: Programming with Microsoft Visual Basic 2012 (3rd ed.). Boston, MA: Course Technology


Cite this Document:

"Interface And Visual Basic Programming" (2016, February 23) Retrieved April 28, 2024, from
https://www.paperdue.com/essay/interface-and-visual-basic-programming-2159854

"Interface And Visual Basic Programming" 23 February 2016. Web.28 April. 2024. <
https://www.paperdue.com/essay/interface-and-visual-basic-programming-2159854>

"Interface And Visual Basic Programming", 23 February 2016, Accessed.28 April. 2024,
https://www.paperdue.com/essay/interface-and-visual-basic-programming-2159854

Related Documents

Algorithms and Visual Basic Programming Exercise Algorithms Output: gross pay Input: hours worked Algorithm: enter number of hours worked if hours worked 0 ? 40, then calculate the gross pay ( hours * display the gross pay otherwise, display an error message end if If hours worked are not accept the new hour worked is between 40 and 60 hours Display gross message Otherwise display error message Interface Code Public Class Form Private Sub-Form1_Load (sender As Object, e As EventArgs) Handles MyBase.Load calculates and displays

Visual Basic Programming and Pseudocode Objective of this project is to develop the following applications: Calculating sales tax on a sale Converting from Fahrenheit to Celsius Calculate a total bulk sales using number of units and price per units. Calculating sales tax on a sale This paper presents an application to calculate a sale tax. The sale tax rate is 6.48% based on the current rate in the United States. Pseudocode Output: Sales tax Input: annual sale Percentage of tax Algorithms enter

Visual Basic is an Event Driven language, which means that programs don't follow the sequential path of traditional languages such as Pascal. Instead bits and pieces of sequential code are associated with certain events such as the clicking of a button. Then when the program is run, events will occur in response to changes in the environment (such as the ticking of the computers internal clock) or by intervention from

The Extreme Programming is also tailored towards a single project to be developed and maintained by a single team, however, in real life many organizations prefer to keep the crucial aspects of software development like data management and release management concerns outside the purview of regulations of a single project manager. The Extreme Programming technique is quite susceptible to adversely affect the 'bad apple' developers that do not have necessary

Cobol: Overview of a Third
PAGES 18 WORDS 4692

This is unlikely to change short of an amazing new technological innovation that takes "natural" language capability and programming to a new level. Let us now compare how COBOL meets the needs of organizations working in various industries. The next section will help clarify why COBOL is in such demand among commercial enterprises worldwide. Chapter 3 - COBOL and Organizational Goals This section analyses how COBOL supports organizational goals. COBOL supports

Aristoxenos, two centuries after Pythagoras released his model, sought to discredit the standing theories held by Pythagorean devotees. In his works, he established that numbers are not relevant to music, and that music is based on perception of what one hears, not any mathematical equation. Descartes as well as Vincenzo Galilei (Galileo's father) both also discredited the music-to-math theories that formed the revolutionary basis for Pythagoras' music work, but not