
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
Concept explainers
Question
Need help and I am allowed to help.

Transcribed Image Text:1.7 Lab Exercise 1a: Write an algorithm
Before you write any code (in C++), you need to write the algorithm in English. The algorithm is the description of the problem and desired
solution. It must include a list or description of the input (if there is any, such as something the user types), output (usually what will be
printed onscreen, though it might be also written to a file), and the steps to create the output.
For this exercise, add comments to the top of the program below, describing an algorithm for sorting a random stack of paper money, to
increasing in value top to bottom. Each line of comment must begin with //. Ignore the code in the program below, but don't delete it. Be
sure your comment algorithm includes the following lines, which should begin with the first word in each line below, and replace the
underscore with your description of each item for this problem:
// input:
// output:
// steps: ( The first is given for you below:)
1. pick up a bill and determine its value
2.
3.
403714.3402758.qx3zqy7
LAB
ACTIVITY
1.7.1: Lab Exercise 1a: Write an algorithm
11
12 int main() { // program to copy itself to screen
13
string s;
// holds a line of the file
14
ifstream in1("./main.cpp");
15
16
17
18
etc...
1 //Type your algorithm here, as comments:
2
3
4
5
6 // don't change the lines below. They are code to copy this entire file to the screen for testing...
7 #include <iostream>
8 #include <fstream>
9 #include <string>
10 using namespace std;
while (getline(in1.s))
cout << s << endl; //copy line to screen
return 0;
main.cpp
Load default template...
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 27 السؤال to create new group called student we use the command الاجابات groupmod student useradd student groupadd student groupdel studentarrow_forwardTask 'A' run on a CPU. The task starts by running for 6 ms. 'A' waits for 4 ms while the operating system runs some instructions to access memory. The CPU is then idle for 1 ms while waiting for the memory read to complete. Finally, the task 'A' runs another 25 ms and completes. What is the CPU performance in ms? [ Give answer as a number only]arrow_forwardWhich of the following is an example of a preventive control to reduce the risk of a phishing attack? a) Training b) Antivirus software c) Email filtering d) All of the above e) b and c onlyarrow_forward
- If you reformat the hard drive on a computer, it erases all personal information from your computer and makes it safe to donate. True Falsearrow_forwardDowngrade assaults are real, and you need to know how to protect yourself from them.arrow_forwardWhat do you call a piece of software that does a certain task, such as scanning for viruses, compressing data, or backing up files?arrow_forward
- Is it safe for kids under 16 to use the internet now that there are protections in place? If this is not the case, what other options do governments have?arrow_forwardDiscuss the importance of installing computer patches and fixes.arrow_forwardDo the restrictions that are presently in place offer adequate protections to prevent children younger than 16 years old from being injured online? What further measures may governments possibly think of implementing if this is not the case?arrow_forward
- What are the undeniable signs that you are putting yourself in danger by passively smelling, and what can you do to protect yourself from being a victim of one of these situations?arrow_forwardDo we expect that minors under the age of 16 will be protected from harm online by the current regulations? What other measures may governments think about doing if this is not the case?arrow_forwardThroughout the software development process, it is crucial to talk about what software security is and why it is important.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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