
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
What would be an algorithm for finding the average?

Transcribed Image Text:The flowchart shown represents a simple purchasing calculation program for a game store, "FrostBlade Games."
### Flowchart Steps:
1. **Start**: The process begins with a welcome message.
- Output: "Welcome to FrostBlade Games"
2. **Input New Games**: The user is prompted to enter the number of new games they wish to purchase.
- Output: "Enter the number of new games to be purchased."
- Input: `amtNew`
3. **Input Old Games**: The user is asked to enter the number of old games they wish to purchase.
- Output: "Enter the number of old games to be purchased."
- Input: `amtUsed`
4. **Calculate Total Cost**: The total cost is computed using the formula:
- `Total = amtNew * NEWCOST + amtUsed * USEDCOST`
5. **Calculate Average Cost**: The average cost of the games is also calculated:
- `Average = (amtNew * NEWCOST + amtUsed * USEDCOST) / 2`
6. **Output Total Cost**: The total cost is displayed to the user.
- Output: "The Total Cost is: $" & `Total`
7. **Output Average Cost**: The average cost is displayed to the user.
- Output: "The Average is: " & `average`
8. **End**: The process concludes.
### Diagram Explanation:
- The flowchart uses a mix of rectangles (processes) and parallelograms (inputs/outputs).
- It progresses linearly from top to bottom, guiding users through each step of the transaction calculation.
- Key operations like input, calculation, and output stages are clearly defined.
This flowchart effectively demonstrates a simple program to calculate and display the total and average cost of purchasing new and used games.
Expert Solution

arrow_forward
Introduction
Algorithm is a step by step procedure for solving a problem
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- What does heuristic search mean? What are the benefits and drawbacks of this algorithm in comparison to other algorithms?arrow_forwardHow do random searching algorithms like DFS, BFS, and IDDFS compare to Genetic Algorithm-based goal search? Genetic algorithms—more effective? Why? Which solves which problems best?arrow_forwardThere are situations in which a sequential search algorithm would be preferable, and there are others in which a binary search algorithm would be preferable, but what are some general guidelines for making this decision?arrow_forward
- Is there an existing version of the Boyer-Moore string search algorithm in some form? Describe the steps that will be taken to put the plan into effect.arrow_forwardHow do you compare random searching techniques like DFS, BFS and IDDFS with Genetic Algorithm based goal search ? Are Genetic Algorithms better ? If so, why ? Which is best for what type of Problems ?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education