Verified Document

Visual Basic Programming And Algorithm

Related Topics:

Algorithm and Visual Basic Programming Jerry Feingold is the owners of a small restaurant who intends to develop a program that will assist him calculating the total amount used to tip a waiter at the restaurant. The program is designed to deduct any liquor charge from the overall total bill, followed by calculating the tip by using a percentage of the remainder. Finally, the program should be designed to display the tip output on the screen. Moreover, the paper desk checks the solution of the algorithms using $20 as the charge of liquor, $85 as the total bill, and 20% for the tip percentage. Finally, the paper desk-checks the program using $35 for the total bill, 15% as the tip percentage and $0 for the liquor charge.

Explanation of the Solution

The first solution to the problem is to display the input and output of the scenario, algorithm, and desk check to ensure that the algorithm is correct. The most important components that can be employed to solve the problem is to identify the input and output of the program. (Zak, 2013). The output is very critical to solving a problem, and the inputs are the items to achieve this goal. The followings are the input and output of the problem:

Output: tip

Input: total bill tip percentage liquor charge

Plan the Algorithm

This step reveals that algorithms used for the problem-solving process, which transforms the input of the problem into an output. The goal of the algorithm is to describe...

The algorithms start by entering the inputs of the items in order to calculate the output of the item. Thus, the algorithms display the output of the item. The paper makes algorithms be consistency by referring to the input and output of the items. The algorithms of the case scenario is as follows:
Algorithm

1. enter the liquor charge, total bill, as well as tip percentage

2. calculate the tip by deducting the overall liquor charge from the total bill and then multiply the remainder of the bill by the tip percentage

3. display the tip

The algorithms are similar to pseudocode that consists of short English statements. The statement is referred as coded because it resembles a programming language. However, the computer cannot understand the pseudocode, the computer programmers still use the pseudocode to assist them planning an algorithm that allows them using the human-readable language to develop a code for a programming language.

2.2: Flowchart of the Solution

Start

enter the liquor charge, total bill, as well as tip percentage calculate the tip by deducting the overall liquor charge from the total bill, and then multiply the remainder of the bill by the tip percentage tip = (total bill --liquor charge) x tip percentage display tip

Stop

Desk-Check Table

total bill liquor charge tip percentage tip

Data…

Sources used in this document:
Reference

Zak, D. (2013). Clearly Visual Basic Programming with Microsoft Visual Basic 2012. (Third Edition). Cengage Learning
Cite this Document:
Copy Bibliography Citation

Related Documents

Visual Basic Programming and Algorithms
Words: 678 Length: 4 Document Type:

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

Algorithm and Visual Basic Programming
Words: 404 Length: 2 Document Type:

Visual Basic Programming and Algorithm Solution to Chapter 5 Exercise Code of Net Pay Project ' Purpose: To display Net Pay ' Programmer: on Public Class Form1 Private Sub-Label1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub-Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub-Label2_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click End Sub Private Sub-Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs)

Pseudocode and Visual Basic Programming
Words: 426 Length: 2 Document Type:

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

Interface and Visual Basic Programming
Words: 601 Length: 3 Document Type:

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) /

Programming & Language Prototyping Extreme
Words: 4993 Length: 12 Document Type: Term Paper

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

Music Education or Cross Platform
Words: 17690 Length: 61 Document Type: Term Paper

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

Sign Up for Unlimited Study Help

Our semester plans gives you unlimited, unrestricted access to our entire library of resources —writing tools, guides, example essays, tutorials, class notes, and more.

Get Started Now