Visual Basic Programming and Algorithm

Total Length: 931 words ( 3 double-spaced pages)

Total Sources: 4

Page 1 of 3

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 an action that the computer will perform. 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….....

Show More ⇣


     Open the full completed essay and source list


OR

     Order a one-of-a-kind custom essay on this topic


sample essay writing service

Cite This Resource:

Latest APA Format (6th edition)

Copy Reference
"Visual Basic Programming And Algorithm" (2016, February 07) Retrieved May 8, 2025, from
https://www.aceyourpaper.com/essays/visual-basic-programming-algorithm-2155787

Latest MLA Format (8th edition)

Copy Reference
"Visual Basic Programming And Algorithm" 07 February 2016. Web.8 May. 2025. <
https://www.aceyourpaper.com/essays/visual-basic-programming-algorithm-2155787>

Latest Chicago Format (16th edition)

Copy Reference
"Visual Basic Programming And Algorithm", 07 February 2016, Accessed.8 May. 2025,
https://www.aceyourpaper.com/essays/visual-basic-programming-algorithm-2155787