Topic
Algorithm in Problem Solving
Instructions
This project provides you with an opportunity to apply those concepts by analyzing the problem, planning an algorithm, and performing a desk-check.
Use the Unit II Template file (a Microsoft Word document) for this project and to complete the three-step process of analyzing the problem, planning the algorithm, and desk-checking the algorithm.
Step 1: Analyze the Problem Step one of this project requires you to first identify a problem and to briefly draft the details of the problem in approximately one to two sentences. Also, compose a solution for the identified problem in a paragraph. You may choose the problem; however, the solution must involve a calculating program which you can design. Be sure to include input and output while analyzing the problem. Here are a few examples of designing a program to solve a problem:
- calculate discount rates
- calculate a customer’s balance (how much he or she owes)
- calculate purchase costs
- calculate employee pay and pay-raise percentages
- calculate the costs of rental merchandise
Step 2: Plan the Algorithm The next part of the project involves drafting pseudocode and a flowchart as part of the planning process of an algorithm. This task helps identify all of the details for an algorithm—planning the algorithm. Draft a set of pseudocode to include at least the following details:
- the output
- the input
- the algorithm with at least three instructions (Be sure the calculation instructions specify both what is to be calculated and also how to perform the calculation.)
Next, draft a flowchart by using the shapes in the template (a Microsoft Word document). The flowchart must include at least the following components:
- one start symbol and one stop symbol (ovals)
- one input symbol and one output symbol (parallelograms)one process symbol (rectangle)
- flowlines
Step 3: Desk-Check the Algorithm The final step involves performing a desk-check by inserting sample data (e.g., values) into a table. This allows you to test the algorithm to ensure it functions properly. Include at least two sample data sets in the desk-check table.
Be sure to save all of your work in one document (the template).
Answer preview
Step 1: Analyze the Problem
- Description of the problem
The problem involves calculating the total cost of buying a Laptop to a customer after deducting a discount of 5 percent.
- Explanation of the solution
The program will calculate the customer discount at the rate of 5% if the customer buys more than one laptop and 3% if the customer buys just one laptop, the total amount due by deducting discount from the original price, and thereafter print the bill showing the original price, discount, and net amount owed.
Word count: 258