Introduction to Programming

Size: px
Start display at page:

Download "Introduction to Programming"

Transcription

1 Introduction to Programming Summer Term 2014 Dr. Adrian Kacso, Univ. Siegen Tel.: 0271/ , Office: H-B 8406 State: April 9, 2014 Betriebssysteme / verteilte Systeme Introduction to Programming (1) i

2 Introduction to Programming Summer Term Introduction Betriebssysteme / verteilte Systeme Introduction to Programming (1) 16

3 1 Introduction... Contents Algorithms and programs The first C++ program Betriebssysteme / verteilte Systeme Introduction to Programming (1) 17

4 1.1 Algorithms and programs From Problem... to Solution Problem Creativity Intuition Mental Exercise Programming Solution Idea Algorithm Program Automatic (Compiler, OS, CPU) (Automatic) Execution Betriebssysteme / verteilte Systeme Introduction to Programming (1) 18

5 1.1 Algorithms and programs... Algorithms An algorithm: Or: is a set of instructions with a precise statement ( meaning) of effective ( actually executable) processing steps noted in a precisely defined language An algorithm is a prescription how to solve a problem using individual, small steps Betriebssysteme / verteilte Systeme Introduction to Programming (1) 19

6 1.1 Algorithms and programs... Algorithms An algorithm: Or: is a set of instructions with a precise statement ( meaning) of effective ( actually executable) processing steps noted in a precisely defined language An algorithm is a prescription how to solve a problem using individual, small steps Betriebssysteme / verteilte Systeme Introduction to Programming (1) 19

7 1.1 Algorithms and programs... Pizza algorithm 1. Get the incredients (flour, salt, eggs, sugar, vegetables...) 2. First clean the flour with a sieve 3. Then add 1 cup of flour, 1 tsp yeast, 1 tsp sugar, 1/2 cup warm water, 2 tablespoons of olive oil, 1 tsp salt. Mix the yeast, sugar and water and make sure it bubbles up 4. Meanwhile wash the tomatos, cut the salami, Then mix with all the other ingredients until combined and then knead the dough for about 10 minutes. Let the dough rise. 6. spread salami, tomato over the pizza and then top with cheese 7. If using circulating oven, bake at 180 C for 20 minutes Otherwise, heat oven to 210 C... Betriebssysteme / verteilte Systeme Introduction to Programming (1) 20

8 1.1 Algorithms and programs... The Computer from inside (VERY simplistic) registers registers memory bus CPU ALU disk Betriebssysteme / verteilte Systeme Introduction to Programming (1) 21

9 1.1 Algorithms and programs... How the CPU works Both binary program and data are in the memory (a sequence of cells, e.g., bytes) Execution: load operation from memory cell addressed by PC to CPU execute the operation increment the PC (PC = Program Counter) Operation can be: load contents of a memory cell to a register perform operation (in the ALU) between registers store a register s contents to a memory cell change the PC Betriebssysteme / verteilte Systeme Introduction to Programming (1) 22

10 1.1 Algorithms and programs... From problem... to solution problem thinking algorithm programming program (C++) compiler solution! CPU binary program One hour of thinking can easily save one week of programming! Or: programming is not trial-and-error! Betriebssysteme / verteilte Systeme Introduction to Programming (1) 23

11 1.2 The First C++ Program The C++ Programming Language developed by B. Stroustrup (in 1983) as an extension of C. Imperative prescribes exactly which statements have to be executed in which order. Object-oriented allows the use of objects and classes A program can be viewed as a collection of classes that are used to produce objects. C++ is in between problem description and CPU operation. (Many say that it is closer to the CPU... ) Betriebssysteme / verteilte Systeme Introduction to Programming (1) 24

12 1.2 The First C++ Program... The first C++ Program #include <iostream> using namespace std; int main() { cout << "Hello, world!\n"; return 0; } All (non-white-space) characters are important C++ is case sensitive: return Return homework: try this with the compiler Betriebssysteme / verteilte Systeme Introduction to Programming (1) 25

13 1.2 The First C++ Program... Parts of a Simple Program #include preprocessor directive (# pound symbol) includes the contents of another file using namespace where to search unknown names main() function starting point of the program Statements prescription what to do Comments: // comment which ends at the end of the line /* comment which may have multiple lines. It ends here: */ Betriebssysteme / verteilte Systeme Introduction to Programming (1) 26

14 1.2 The First C++ Program... The main() Function Conventional: tells the compiler where the program starts Is of type int (returns an integer number) Return value is given back to the operating system after the program has terminated (ended) The program executes the statements inside main(), exactly in the given order, from the beginning (top) to the end (bottom) Betriebssysteme / verteilte Systeme Introduction to Programming (1) 27

15 1.2 The First C++ Program... The first C++ Program / Author: James Bond Program: first.cpp Description: first program / #include <iostream> using namespace std; // iostream library // standard library namespace int main() { cout << "Hello, world!\n"; // Message // program s main function } return 0; // Program termination Betriebssysteme / verteilte Systeme Introduction to Programming (1) 28

16 1.2 The First C++ Program... Compiling a Program x.h header files (include files) init program init memory call main() return result x.cpp preprocess x.cpp compile x.o link hello source file source file object file executable On the lab computers: g++ x.cpp -o hello Betriebssysteme / verteilte Systeme Introduction to Programming (1) 29

17 1.2 The First C++ Program... Functions #include <iostream> using namespace std; int add(int x, int y) { // this is a function return (x+y); } int main() { int a,b,c; cout << "Enter two numbers: "; cin >> a; cin >> b; c = add(a,b); cout << "The sum is " << c << endl; return 0; } Betriebssysteme / verteilte Systeme Introduction to Programming (1) 30

18 1.2 The First C++ Program... Functions... Statements (e.g., in main()) are executed in their order in the code When a function is called, the program branches to the beginning of it A function consists of header and body header: type name ( parameter-list ) body: { list-of-statements } A function returns when it executes the return statement (or when it reaches the end of its body) Betriebssysteme / verteilte Systeme Introduction to Programming (1) 31

19 1.2 The First C++ Program... Remark on used notations Throughout the slides, the following styles are used: typewriter and typewriter for program text, text typed into the computer, text printed by the computer e.g., main(), ; green italics for non-terminal symbols: names standing for parts of a program (or a command) e.g., parameter-list bold blue for terms being defined red and italics to emphasize text Betriebssysteme / verteilte Systeme Introduction to Programming (1) 32

20 1.2 The First C++ Program... Debug Output We can add more output to see what the program is doing: #include <iostream> using namespace std; int add(int x, int y) { cout << "In add(), received " << x << " and " << y << "\n"; return (x+y); } Betriebssysteme / verteilte Systeme Introduction to Programming (1) 33

21 1.2 The First C++ Program... Debug Output... int main() { cout << "I m in main()!\n"; int a,b,c; cout << "Enter two numbers: "; cin >> a; cin >> b; cout << "\ncalling add()\n"; c = add(a,b); cout << "\nback in main().\n"; cout << "The sum is " << c << endl; cout << "Exiting...\n\n"; return 0; } Betriebssysteme / verteilte Systeme Introduction to Programming (1) 34

22 1.3 Repetition The first C++ Program #include <iostream> using namespace std; int main() { cout << "Hello, world!\n"; Insert a file with definitions for input/output Search names in the name space std Main function: the execution will start here A statement: print a text } return 0; Another statement: return from the function Betriebssysteme / verteilte Systeme Introduction to Programming (1) 35

23 1.3 Repetition... From Problem... to Solution problem thinking algorithm programming program (C++) compiler solution! CPU binary program Betriebssysteme / verteilte Systeme Introduction to Programming (1) 36

Chapter One Introduction to Programming

Chapter One Introduction to Programming Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

An Incomplete C++ Primer. University of Wyoming MA 5310

An Incomplete C++ Primer. University of Wyoming MA 5310 An Incomplete C++ Primer University of Wyoming MA 5310 Professor Craig C. Douglas http://www.mgnet.org/~douglas/classes/na-sc/notes/c++primer.pdf C++ is a legacy programming language, as is other languages

More information

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language Simple C++ Programs Engineering Problem Solving with C++, Etter/Ingber Chapter 2 Simple C++ Programs Program Structure Constants and Variables C++ Operators Standard Input and Output Basic Functions from

More information

Sequential Program Execution

Sequential Program Execution Sequential Program Execution Quick Start Compile step once always g++ -o Realtor1 Realtor1.cpp mkdir labs cd labs Execute step mkdir 1 Realtor1 cd 1 cp../0/realtor.cpp Realtor1.cpp Submit step cp /samples/csc/155/labs/1/*.

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Summer Term 2016 Dr. Adrian Kacso, Univ. Siegen adriana.dkacsoa@duni-siegena.de Tel.: 0271/740-3966, Office: H-B 8406 / H-A 5109 State: April 11, 2016 Betriebssysteme / verteilte

More information

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 3: Input/Output

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 3: Input/Output C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 3: Input/Output Objectives In this chapter, you will: Learn what a stream is and examine input and output streams Explore

More information

Ubuntu. Ubuntu. C++ Overview. Ubuntu. History of C++ Major Features of C++

Ubuntu. Ubuntu. C++ Overview. Ubuntu. History of C++ Major Features of C++ Ubuntu You will develop your course projects in C++ under Ubuntu Linux. If your home computer or laptop is running under Windows, an easy and painless way of installing Ubuntu is Wubi: http://www.ubuntu.com/download/desktop/windowsinstaller

More information

Easter Brunch Menu Ideas with Chef Eric Crowley

Easter Brunch Menu Ideas with Chef Eric Crowley Easter Brunch Menu Ideas with Chef Eric Crowley March 7th, 2014 Chef Eric Jacques Crowley is a seasoned, professional chef and the founder, owner and chef instructor at his dynamic cooking school, Chef

More information

Lab 2 - CMPS 1043, Computer Science I Introduction to File Input/Output (I/O) Projects and Solutions (C++)

Lab 2 - CMPS 1043, Computer Science I Introduction to File Input/Output (I/O) Projects and Solutions (C++) Lab 2 - CMPS 1043, Computer Science I Introduction to File Input/Output (I/O) Projects and Solutions (C++) (Revised from http://msdn.microsoft.com/en-us/library/bb384842.aspx) * Keep this information to

More information

Appendix K Introduction to Microsoft Visual C++ 6.0

Appendix K Introduction to Microsoft Visual C++ 6.0 Appendix K Introduction to Microsoft Visual C++ 6.0 This appendix serves as a quick reference for performing the following operations using the Microsoft Visual C++ integrated development environment (IDE):

More information

(Figure revised from Johnson and Raven, 2004, Biology, Holt Rinehart and Winston, p. 110)

(Figure revised from Johnson and Raven, 2004, Biology, Holt Rinehart and Winston, p. 110) Alcoholic Fermentation in Yeast Adapted from Alcoholic Fermentation in Yeast Investigation in the School District of Philadelphia Biology Core Curriculum 2011 by Drs. Jennifer Doherty and Ingrid Waldron,

More information

Curriculum Map. Discipline: Computer Science Course: C++

Curriculum Map. Discipline: Computer Science Course: C++ Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code

More information

The programming language C. sws1 1

The programming language C. sws1 1 The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

More information

What are the similarities between this equation for burning glucose and the equation for cellular respiration of glucose when oxygen is available?

What are the similarities between this equation for burning glucose and the equation for cellular respiration of glucose when oxygen is available? Cellular Respiration in Yeast Adapted from Alcoholic Fermentation in Yeast Investigation in the School District of Philadelphia Biology Core Curriculum 2009 by Dr. Jennifer Doherty and Dr. Ingrid Waldron,

More information

Basic Bread. Equipment: Ingredients:

Basic Bread. Equipment: Ingredients: Equipment: kitchen scales measuring spoons 2 large mixing bowls scissors 1 medium mixing jug, big enough for 500 ml at least wooden spoon pastry brush large board or flat, clean surface for kneading dough

More information

Proceedings of the Annual Meeting of the American Statistical Association, August 5-9, 2001 STATISTICIANS WOULD DO WELL TO USE DATA FLOW DIAGRAMS

Proceedings of the Annual Meeting of the American Statistical Association, August 5-9, 2001 STATISTICIANS WOULD DO WELL TO USE DATA FLOW DIAGRAMS Proceedings of the Annual Meeting of the American Association, August 5-9, 2001 STATISTICIANS WOULD DO WELL TO USE DATA FLOW DIAGRAMS Mark A. Martin Bayer Diagnostics, 333 Coney Street, East Walpole MA

More information

1. According to the Food Guide Pyramid, how many daily servings do we need of fruits?

1. According to the Food Guide Pyramid, how many daily servings do we need of fruits? NAME HOUR VIDEO WORKSHEET 1. According to the Food Guide Pyramid, how many daily servings do we need of fruits? 2. How many daily servings do we need of vegetables according to the Food Guide Pyramid?

More information

Notes on Assembly Language

Notes on Assembly Language Notes on Assembly Language Brief introduction to assembly programming The main components of a computer that take part in the execution of a program written in assembly code are the following: A set of

More information

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall-2015 1

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall-2015 1 QUIZ-II Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. (For

More information

Basics of I/O Streams and File I/O

Basics of I/O Streams and File I/O Basics of This is like a cheat sheet for file I/O in C++. It summarizes the steps you must take to do basic I/O to and from files, with only a tiny bit of explanation. It is not a replacement for reading

More information

Game Programming & Game Design

Game Programming & Game Design Unit 11: Game Programming & Game Design BRIDGES TO COMPUTING http://bridges.brooklyn.cuny.edu College Now, Bridges to Computing Page 1 Topic Descriptions and Objectives Unit 7: Game Programming & Game

More information

CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

More information

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions CS101 Lecture 26: Low Level Programming John Magee 30 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? How can we control the computer s circuits? How

More information

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority) Boolean Expressions, Conditions, Loops, and Enumerations Relational Operators == // true if two values are equivalent!= // true if two values are not equivalent < // true if left value is less than the

More information

2014 PA STICKY BUN CONTEST Winning Recipes

2014 PA STICKY BUN CONTEST Winning Recipes 1 st Place Pamela McFall McKean County Bacon Chestnut Sticky Buns 4 tsp milk 1 cup plus 3 tbsp flour 1 tbsp sugar, 1/4 tsp sugar 1/4 tsp salt 1 tsp active dry yeast 2 tbsp butter 1/2 an egg 1/2 cup chopped

More information

Comp151. Definitions & Declarations

Comp151. Definitions & Declarations Comp151 Definitions & Declarations Example: Definition /* reverse_printcpp */ #include #include using namespace std; int global_var = 23; // global variable definition void reverse_print(const

More information

C++ Language Tutorial

C++ Language Tutorial cplusplus.com C++ Language Tutorial Written by: Juan Soulié Last revision: June, 2007 Available online at: http://www.cplusplus.com/doc/tutorial/ The online version is constantly revised and may contain

More information

Running your first Linux Program

Running your first Linux Program Running your first Linux Program This document describes how edit, compile, link, and run your first linux program using: - Gnome a nice graphical user interface desktop that runs on top of X- Windows

More information

We give great importance to breakfast, especially if it weekend. A typical. Turkish breakfast consists of slices of Turkish feta cheese, honey or jam,

We give great importance to breakfast, especially if it weekend. A typical. Turkish breakfast consists of slices of Turkish feta cheese, honey or jam, A. TURKISH BREAKFAST We give great importance to breakfast, especially if it weekend. A typical Turkish breakfast consists of slices of Turkish feta cheese, honey or jam, butter, black olives, tomatoes

More information

Banana-Cinnamon French Toast (#70)

Banana-Cinnamon French Toast (#70) Banana-Cinnamon French Toast (#70) 25 slices whole wheat bread 8 eggs 5 bananas 2 ½ cups milk, low fat, 1% 1 ½ tsp vanilla extract ¼ cup vegetable oil 3 Tbsp brown sugar 1 ½ tsp cinnamon Serving size:

More information

Course MS10975A Introduction to Programming. Length: 5 Days

Course MS10975A Introduction to Programming. Length: 5 Days 3 Riverchase Office Plaza Hoover, Alabama 35244 Phone: 205.989.4944 Fax: 855.317.2187 E-Mail: rwhitney@discoveritt.com Web: www.discoveritt.com Course MS10975A Introduction to Programming Length: 5 Days

More information

JULIE S CINNAMON ROLLS

JULIE S CINNAMON ROLLS JULIE S CINNAMON ROLLS Dough: 1 pkg Dry Yeast (not Rapid Rise) 1 cup milk scalded 1/4 cup sugar 1/4 cup water (warm 110 degrees) 1/4 cup vegetable oil 1 tsp salt 3 1/2 cups all-purpose flour 1 egg Inside

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

Notes on Algorithms, Pseudocode, and Flowcharts

Notes on Algorithms, Pseudocode, and Flowcharts Notes on Algorithms, Pseudocode, and Flowcharts Introduction Do you like hot sauce? Here is an algorithm for how to make a good one: Volcanic Hot Sauce (from: http://recipeland.com/recipe/v/volcanic-hot-sauce-1125)

More information

Banana Boats. STYLE: Foil DIFFICULTY: Beginner TOTAL TIME: Prep 20 min/bake: 5-10 min SERVINGS: 4

Banana Boats. STYLE: Foil DIFFICULTY: Beginner TOTAL TIME: Prep 20 min/bake: 5-10 min SERVINGS: 4 Banana Boats STYLE: Foil TOTAL TIME: Prep 20 min/bake: 5-10 min SERVINGS: 4 4 medium unpeeled ripe bananas 4 teaspoons miniature chocolate chips 4 tablespoons miniature marshmallows Cut banana peel lengthwise

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements 9 Control Statements 9.1 Introduction The normal flow of execution in a high level language is sequential, i.e., each statement is executed in the order of its appearance in the program. However, depending

More information

Introduction to Computers and C++ Programming

Introduction to Computers and C++ Programming 1 Introduction to Computers and C++ Programming 1.1 Computer Systems 2 Hardware 2 Software 7 High-Level Languages 8 Compilers 9 History Note 12 1.2 Programming and Problem-Solving 13 Algorithms 14 Program

More information

MaxData 2007 Database Concepts

MaxData 2007 Database Concepts i MaxData 2007 Database Concepts ii MaxData 2007 Contents Introduction... 1 What Is MaxData 2007?... 1 System Requirements... 1 Checking your version of Office... 1 Database Concepts... 2 What Is a Database?...

More information

Onboard bread recipes

Onboard bread recipes Onboard bread recipes Basic French Bread Recipe (from The James Beard Cookbook, 1959) 1 package yeast 2 cups lukewarm water 2 Tbs. sugar 1 Tbs. salt 5-7 cups flour (one egg white, if desired) Dissolve

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

King Arthur Flour Baking Contest! August 9, 2013 LOCATION AT LEBANON COUNTRY FAIR GROUNDS

King Arthur Flour Baking Contest! August 9, 2013 LOCATION AT LEBANON COUNTRY FAIR GROUNDS King Arthur Flour Baking Contest! August 9, 2013 LOCATION AT LEBANON COUNTRY FAIR GROUNDS Open to : Junior/ Youth - Ages 8 17 Adult - Ages 18 120 King Arthur Flour Prizes: Adult Category 1 st place: $75

More information

!!!!!!! Herring with beetroot gnocchi

!!!!!!! Herring with beetroot gnocchi Herring with beetroot gnocchi 1 large red onion 2 tomatoes about 200g each 1 aubergine, around 300g 2 garlic cloves, finely chopped 4 tbsp olive oil 4 large herring, scaled and filleted 300ml fresh home-made

More information

FHA-HERO: The California Affiliate of FCCLA Competitive Recognition Events

FHA-HERO: The California Affiliate of FCCLA Competitive Recognition Events Competitive Recognition Events 2015 2016 FCCLA STAR Event Culinary Arts Region Qualifying Competition Menu & Recipes Menu Garden Salad with Vinaigrette Dressing Classic Steak Diane Green Beans and Mushrooms

More information

Ch 7-1. Object-Oriented Programming and Classes

Ch 7-1. Object-Oriented Programming and Classes 2014-1 Ch 7-1. Object-Oriented Programming and Classes May 10, 2014 Advanced Networking Technology Lab. (YU-ANTL) Dept. of Information & Comm. Eng, Graduate School, Yeungnam University, KOREA (Tel : +82-53-810-2497;

More information

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the

More information

OKLAHOMA SUBJECT AREA TESTS (OSAT )

OKLAHOMA SUBJECT AREA TESTS (OSAT ) CERTIFICATION EXAMINATIONS FOR OKLAHOMA EDUCATORS (CEOE ) OKLAHOMA SUBJECT AREA TESTS (OSAT ) FIELD 081: COMPUTER SCIENCE September 2008 Subarea Range of Competencies I. Computer Use in Educational Environments

More information

The University of Alabama in Huntsville Electrical and Computer Engineering CPE 112 01 Test #4 November 20, 2002. True or False (2 points each)

The University of Alabama in Huntsville Electrical and Computer Engineering CPE 112 01 Test #4 November 20, 2002. True or False (2 points each) True or False (2 points each) The University of Alabama in Huntsville Electrical and Computer Engineering CPE 112 01 Test #4 November 20, 2002 1. Using global variables is better style than using local

More information

Appendix M: Introduction to Microsoft Visual C++ 2010 Express Edition

Appendix M: Introduction to Microsoft Visual C++ 2010 Express Edition Appendix M: Introduction to Microsoft Visual C++ 2010 Express Edition This book may be ordered from Addison-Wesley in a value pack that includes Microsoft Visual C++ 2010 Express Edition. Visual C++ 2010

More information

Patient and Family Education. Low Sodium Recipes

Patient and Family Education. Low Sodium Recipes Patient and Family Education Low Sodium Recipes Try these recipes to get started with lowsodium cooking that tastes good and is quick and easy! Oatmeal muffins 2 eggs 1 teaspoon vanilla extract 2 cups

More information

SPM-2 PLEASE READ THESE INSTRUCTIONS CAREFULLY AND RETAIN FOR FUTURE REFERENCE.

SPM-2 PLEASE READ THESE INSTRUCTIONS CAREFULLY AND RETAIN FOR FUTURE REFERENCE. SPM-2 PLEASE READ THESE INSTRUCTIONS CAREFULLY AND RETAIN FOR FUTURE REFERENCE. CONGRATULATIONS You are now the proud, new owner of a SMART PLANET Mini SUPERPRETZEL Soft Pretzels Maker with Melting Pod

More information

- Hour 1 - Introducing Visual C++ 5

- Hour 1 - Introducing Visual C++ 5 - Hour 1 - Introducing Visual C++ 5 Welcome to Hour 1 of Teach Yourself Visual C++ 5 in 24 Hours! Visual C++ is an exciting subject, and this first hour gets you right into the basic features of the new

More information

Licensed to: CengageBrain User

Licensed to: CengageBrain User This is an electronic version of the print textbook. Due to electronic rights restrictions, some third party content may be suppressed. Editorial review has deemed that any suppressed content does not

More information

Computer Programming. Course Details An Introduction to Computational Tools. Prof. Mauro Gaspari: mauro.gaspari@unibo.it

Computer Programming. Course Details An Introduction to Computational Tools. Prof. Mauro Gaspari: mauro.gaspari@unibo.it Computer Programming Course Details An Introduction to Computational Tools Prof. Mauro Gaspari: mauro.gaspari@unibo.it Road map for today The skills that we would like you to acquire: to think like a computer

More information

2016 National Leadership Conference Culinary Arts Menu and Required Equipment List Event will take place at The Art Institute of San Diego

2016 National Leadership Conference Culinary Arts Menu and Required Equipment List Event will take place at The Art Institute of San Diego Family, Career and Community Leaders of America 2016 National Leadership Conference Culinary Arts Menu and Required Equipment List Event will take place at The Art Institute of San Diego Teams will be

More information

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Introduction to Programming (in C++) Loops Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Example Assume the following specification: Input: read a number N > 0 Output:

More information

Visual Studio 2008 Express Editions

Visual Studio 2008 Express Editions Visual Studio 2008 Express Editions Visual Studio 2008 Installation Instructions Burning a Visual Studio 2008 Express Editions DVD Download (http://www.microsoft.com/express/download/) the Visual Studio

More information

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification: Example Introduction to Programming (in C++) Loops Assume the following specification: Input: read a number N > 0 Output: write the sequence 1 2 3 N (one number per line) Jordi Cortadella, Ricard Gavaldà,

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

COMPUTER SCIENCE 1999 (Delhi Board)

COMPUTER SCIENCE 1999 (Delhi Board) COMPUTER SCIENCE 1999 (Delhi Board) Time allowed: 3 hours Max. Marks: 70 Instructions: (i) All the questions are compulsory. (ii) Programming Language: C++ QUESTION l. (a) Why main function is special?

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

16. Recursion. COMP 110 Prasun Dewan 1. Developing a Recursive Solution

16. Recursion. COMP 110 Prasun Dewan 1. Developing a Recursive Solution 16. Recursion COMP 110 Prasun Dewan 1 Loops are one mechanism for making a program execute a statement a variable number of times. Recursion offers an alternative mechanism, considered by many to be more

More information

2) What is the structure of an organization? Explain how IT support at different organizational levels.

2) What is the structure of an organization? Explain how IT support at different organizational levels. (PGDIT 01) Paper - I : BASICS OF INFORMATION TECHNOLOGY 1) What is an information technology? Why you need to know about IT. 2) What is the structure of an organization? Explain how IT support at different

More information

Fairtrade Fortnight Banana Recipe Book

Fairtrade Fortnight Banana Recipe Book Fairtrade Fortnight Banana Recipe Book Produced by The Library s Green Impact Teams This booklet was produced by the Library s Green Impact Team using a selection of recipes from the BBC website to promote

More information

Part 1 Foundations of object orientation

Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 1 Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 2 1 OFWJ_C01.QXD 2/3/06 2:14 pm Page 3 CHAPTER 1 Objects and classes Main concepts discussed

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

Chapter 6: Mixtures. Overall Objectives 46. 6.1 Introduction 46. Time Required: 6.2 Types of mixtures 46

Chapter 6: Mixtures. Overall Objectives 46. 6.1 Introduction 46. Time Required: 6.2 Types of mixtures 46 Chapter 6: Mixtures Overall Objectives 46 6.1 Introduction 46 6.2 Types of mixtures 46 6.3 Like dissolved like 46 6.4 Soap 47 6.5 Summary 47 Experiment 6: Mix it Up! 48 Review 52 Notes 52 Time Required:

More information

LOW PRO BREAD, PIZZA, SHELLS, ROLLS, BAGELS, PITA BREAD, PRETZEL Recipes from Taste Connection.com

LOW PRO BREAD, PIZZA, SHELLS, ROLLS, BAGELS, PITA BREAD, PRETZEL Recipes from Taste Connection.com LOW PRO BREAD, PIZZA, SHELLS, ROLLS, BAGELS, PITA BREAD, PRETZEL Recipes from Taste Connection.com Bread Mix: TC - LOW-PROTEIN BREAD MIX - A low-protein bread mix that can be used to make bread, pizza

More information

Bread. Learning objective: Understand how to work with fresh yeast to make bread

Bread. Learning objective: Understand how to work with fresh yeast to make bread Bread Learning objective: Understand how to work with fresh yeast to make bread Ingredients: 350g... plain flour ½ tsp salt ½ tsp sugar 15g fresh yeast 1... tablet 15g... 200mls... water large mixing bowl,

More information

Fat-burning recipes, low-calories desserts and healthy snacks. Frittata Number of servings: 8

Fat-burning recipes, low-calories desserts and healthy snacks. Frittata Number of servings: 8 Fat-burning recipes, low-calories desserts and healthy snacks Frittata 1 c Egg substitute 1 Omega-3 egg 2 Tbs Fat free half and half 1/4 tsp Ground black pepper 2 tsp Extra virgin olive oil 1 Tbs Trans

More information

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011

INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 1 Goals of the Lecture Present an introduction to Objective-C 2.0 Coverage of the language will be INCOMPLETE

More information

Integrating the C++ Standard Template Library Into the Undergraduate Computer Science Curriculum

Integrating the C++ Standard Template Library Into the Undergraduate Computer Science Curriculum Integrating the C++ Standard Template Library Into the Undergraduate Computer Science Curriculum James P. Kelsh James.Kelsh@cmich.edu Roger Y. Lee lee@cps.cmich.edu Department of Computer Science Central

More information

OPEN FUTURES COOKING IN SCHOOL COOKING SKILLS TEACHING COOKING IN PRIMARY SCHOOL PREPARATION AND A PUPILS AGE

OPEN FUTURES COOKING IN SCHOOL COOKING SKILLS TEACHING COOKING IN PRIMARY SCHOOL PREPARATION AND A PUPILS AGE OPEN FUTURES COOKING IN SCHOOL COOKING SKILLS Supporting the teaching of cooking and enhancing the development and progression of cooking in primary schools. AND A PUPILS AGE The information focuses on

More information

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping 3.1.1 Constants, variables and data types Understand what is mean by terms data and information Be able to describe the difference

More information

Albergo Dimaro***superior

Albergo Dimaro***superior BARLEY SOUP TRENTINO STYLE (Orzèt alla trentina) Ingredients for 6 persons: 180 grams of barley 1 ham bone with meat still attached 1 potato 1 carrot 1 leek 2 handfuls of peas 2 tablespoons chopped parsley

More information

Pseudo code Tutorial and Exercises Teacher s Version

Pseudo code Tutorial and Exercises Teacher s Version Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy

More information

Introduction to Computers and C++ Programming

Introduction to Computers and C++ Programming M01_SAVI1346_07_SB_C01.fm Page 1 Friday, January 4, 2008 5:01 PM Introduction to Computers and C++ Programming 1 1.1 COMPUTER SYSTEMS 2 Hardware 2 Software 7 High-Level Languages 8 Compilers 9 History

More information

Lab 2: Swat ATM (Machine (Machine))

Lab 2: Swat ATM (Machine (Machine)) Lab 2: Swat ATM (Machine (Machine)) Due: February 19th at 11:59pm Overview The goal of this lab is to continue your familiarization with the C++ programming with Classes, as well as preview some data structures.

More information

What is a Loop? Pretest Loops in C++ Types of Loop Testing. Count-controlled loops. Loops can be...

What is a Loop? Pretest Loops in C++ Types of Loop Testing. Count-controlled loops. Loops can be... What is a Loop? CSC Intermediate Programming Looping A loop is a repetition control structure It causes a single statement or a group of statements to be executed repeatedly It uses a condition to control

More information

CHEMICAL FORMULAS AND EQUATIONS

CHEMICAL FORMULAS AND EQUATIONS reflect Imagine that you and three other classmates had enough supplies and the recipe to make one pepperoni pizza. The recipe might include a ball of dough, a cup of pizza sauce, a cup of cheese, and

More information

Sansefestival 2014 Opskrifter fra Midtjylland & Limfjorden

Sansefestival 2014 Opskrifter fra Midtjylland & Limfjorden IN DENMARK 2014 Sansefestival 2014 Opskrifter fra Midtjylland & Limfjorden DEN EUROPÆISKE UNION Den Europæiske Fond for Regionaludvikling Vi investerer i din fremtid VisitDenmark MIDTJYLLAND & LIMFJORDEN

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

Linux Scheduler Analysis and Tuning for Parallel Processing on the Raspberry PI Platform. Ed Spetka Mike Kohler

Linux Scheduler Analysis and Tuning for Parallel Processing on the Raspberry PI Platform. Ed Spetka Mike Kohler Linux Scheduler Analysis and Tuning for Parallel Processing on the Raspberry PI Platform Ed Spetka Mike Kohler Outline Abstract Hardware Overview Completely Fair Scheduler Design Theory Breakdown of the

More information

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com CSCI-UA.0201-003 Computer Systems Organization Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Some slides adapted (and slightly modified)

More information

Some Fair Trade Recipes to get you started

Some Fair Trade Recipes to get you started Some Fair Trade Recipes to get you started Fair Trade Banana Bread 225 g (8 oz) self-raising flour 100 g (4 oz) butter 150 g (5 oz) caster sugar 450 g (1 lb) Fair Trade bananas (the gooier the better)

More information

A TOAST TO OUR COMMUNITY

A TOAST TO OUR COMMUNITY BCTF/CIDA Global Classroom Initiative 2005 A TOAST TO OUR COMMUNITY by Catherine Brett Whitelaw Subject: Grades: Lesson title: Social responsibility and social studies 5 7 (can be adapted for younger grades)

More information

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE

MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES FIELD 050: COMPUTER SCIENCE MICHIGAN TEST FOR TEACHER CERTIFICATION (MTTC) TEST OBJECTIVES Subarea Educational Computing and Technology Literacy Computer Systems, Data, and Algorithms Program Design and Verification Programming Language

More information

Pastry Croissant Moons

Pastry Croissant Moons Pastry Croissant Moons Sandra Mulvany and Brilliant Publications Healthy Cooking for Secondary Schools (Book 5) This page may be photocopied by the purchasing institution only. www.brilliantpublications.co.uk

More information

Images of Microsoft Excel dialog boxes Microsoft. All rights reserved. This content is excluded from our Creative Commons license.

Images of Microsoft Excel dialog boxes Microsoft. All rights reserved. This content is excluded from our Creative Commons license. 1 Images of Microsoft Excel dialog boxes Microsoft. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. Tool

More information

The Creative Homemaking Guide to. Quick Bread Recipes. by Rachel Paxton

The Creative Homemaking Guide to. Quick Bread Recipes. by Rachel Paxton The Creative Homemaking Guide to Quick Bread Recipes by Rachel Paxton ABOUT CREATIVE HOMEMAKING: Visit Creative Homemaking for all of your homemaking needs. Creative Homemaking offers cleaning hints, a

More information

Member Functions of the istream Class

Member Functions of the istream Class Member Functions of the istream Class The extraction operator is of limited use because it always uses whitespace to delimit its reads of the input stream. It cannot be used to read those whitespace characters,

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

CHAPTER 3 Boolean Algebra and Digital Logic

CHAPTER 3 Boolean Algebra and Digital Logic CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4

More information

Visual C++ 2010 Tutorial

Visual C++ 2010 Tutorial Visual C++ 2010 Tutorial Fall, 2011 Table of Contents Page No Introduction ------------------------------------------------------------------- 2 Single file program demo --------- -----------------------------------------

More information

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas CS 110B - Rule Storage Classes Page 18-1 Attributes are distinctive features of a variable. Data type, int or double for example, is an attribute. Storage class is another attribute. There are four storage

More information

Computers and Programming

Computers and Programming Chapter 1 Computers and Programming 1.1 What is a Computer? 1.2 Computer Programming 1.3 Programs Are Objects 1.4 Operating Systems and Windows 1.5 Software Architecture 1.5.1 Class Diagrams 1.6 Summary

More information

7.7 Case Study: Calculating Depreciation

7.7 Case Study: Calculating Depreciation 7.7 Case Study: Calculating Depreciation 1 7.7 Case Study: Calculating Depreciation PROBLEM Depreciation is a decrease in the value over time of some asset due to wear and tear, decay, declining price,

More information