1,357
4
Essay, 2 pages (450 words)

Week 1 lab essay sample

Week 1 Lab

TCO 1: Given a simple problem, design and desk-check a solution that is expressed in terms of pseudocode, flowchart, and/or input-process-output (IPO) diagrams.

Lab
This exercise will cover the steps used to create a solution. You will use variable lists, IPO charts, pseudocode, flowcharts, and desk-checking.

Rubric

Point distribution for this activity:
Lab Activity
Document
Points possible
Points received
Part 1
10

Part 2
10

Part 3
10

Part 4
10

Part 5
10

Total Points
50

Problem:

You have an idea for a restaurant tip calculator app that you want to develop to use on your mobile phone when you go out to eat. You can enter the amount of the check before taxes, the tax rate, and the tip percentage. It should display the amount before taxes, the dollar amount of the taxes, the dollar amount of the tip (calculated on amount before taxes), and the total amount including taxes and tip.

1—Variable List With Data Type
List all variables you will use (use valid variable names). Indicate whether the data type is string, integer, or decimal, and so on. checkAmount double
taxRate double
tipPercent double
taxAmount double
tipAmount double
grandTotal double

2—IPO Model
List the inputs, any processes/calculations, and the outputs. Use the same valid variable names you used in Step 1.

Inputs
Process (calculations)
Outputs

checkAmount
taxRate
tipPercent

taxAmount = checkAmount * taxRate

tipAmount = checkAmount * tipPercent

grandTotal = checkAmount + taxAmount + tipAmount

checkAmount
taxAmount
tipAmount
grandTotal

3—Flowchart
Use MS Visio to create a flowchart. Paste the flowchart here, or attach it as a separate document. Use the same valid variable names you used in Step 1.

4—Pseudocode
Describe your solution using pseudocode. Use the same valid variable names you selected in Step 1. Start
Output “ Enter Check Amount: “
Input checkAmount
Output “ Enter taxRate: “
Input taxRate
Output “ Enter tipPercent: “
Input tipPercent
taxAmount = checkAmount * taxRate
tipAmount = checkAmount * tipPercent
grandTotal = checkAmount + taxAmount + tipAmount
Output “ Check Amount is “ + checkAmount
Output “ Tax Amount is “ + taxAmount
Output “ Tip Amount is “ + tipAmount
Output “ Grand Total is “ + grandTotal
End

5—Desk-Check
Desk-check your solution using the following sample data.
Amount of check before taxes: $28. 50
Tax rate: 6%
Tip percentage: 18%
Enter the expected outputs.
Expected total tax amount ____________
Expected total tip amount _____________
Expected total including tax and tip ____________

For each variable in your program, write the variable name selected in Step 1, in the heading for the variable columns (not all columns may be used). For each step in your algorithm, write its step number in the left column (not all rows may be used). Using the sample inputs above, enter the value of each variable after each step has been executed. Note any output displayed to the user.

Step
Variables (write variable names in first line below)
Output
Enter step numbers

1

2

3

Thank's for Your Vote!
Week 1 lab essay sample. Page 1
Week 1 lab essay sample. Page 2
Week 1 lab essay sample. Page 3
Week 1 lab essay sample. Page 4
Week 1 lab essay sample. Page 5
Week 1 lab essay sample. Page 6

This work, titled "Week 1 lab essay sample" was written and willingly shared by a fellow student. This sample can be utilized as a research and reference resource to aid in the writing of your own work. Any use of the work that does not include an appropriate citation is banned.

If you are the owner of this work and don’t want it to be published on AssignBuster, request its removal.

Request Removal
Cite this Essay

References

AssignBuster. (2021) 'Week 1 lab essay sample'. 26 December.

Reference

AssignBuster. (2021, December 26). Week 1 lab essay sample. Retrieved from https://assignbuster.com/week-1-lab-essay-sample/

References

AssignBuster. 2021. "Week 1 lab essay sample." December 26, 2021. https://assignbuster.com/week-1-lab-essay-sample/.

1. AssignBuster. "Week 1 lab essay sample." December 26, 2021. https://assignbuster.com/week-1-lab-essay-sample/.


Bibliography


AssignBuster. "Week 1 lab essay sample." December 26, 2021. https://assignbuster.com/week-1-lab-essay-sample/.

Work Cited

"Week 1 lab essay sample." AssignBuster, 26 Dec. 2021, assignbuster.com/week-1-lab-essay-sample/.

Get in Touch

Please, let us know if you have any ideas on improving Week 1 lab essay sample, or our service. We will be happy to hear what you think: [email protected]