1 CS161 Introduction to Computer Science Topic #17.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Introduction to Programming Lecture 39. Copy Constructor.
Computer Science 2 Data Structures V section 2 Recitation 1.
1 9/13/06CS150 Introduction to Computer Science 1 Type Casting.
1 Homework Assignments Turn in HW1 (If not done yet, catch up!) Questions about HW1? Anyone still stuck on apply / UNIX account? Everyone have the books?
COMP1180 Review Date: 4 March, 2009 Time: 10:30am - 12:20pm Venue: –CS students -- FSC801C and FSC801D –IS and other students -- OEE1017 Remarks: – 1)
1 9/29/06CS150 Introduction to Computer Science 1 Loops Section Page 255.
1 9/15/06CS150 Introduction to Computer Science 1 Combined Assignments, Relational Operators, and the If Statement.
1 9/29/06CS150 Introduction to Computer Science 1 Loops Section Page 255.
Spring R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Final Exam ReviewFinal Exam Review –Assessment –Exam Format –C –Matlab.
1 9/28/07CS150 Introduction to Computer Science 1 Loops section 5.2, 5.4, 5.7.
1 10/20/08CS150 Introduction to Computer Science 1 do/while and Nested Loops Section 5.5 & 5.11.
1 10/11/06CS150 Introduction to Computer Science 1 do/while and Nested Loops.
Topic R1 – Review for the Midterm Exam. CISC 105 – Review for the Midterm Exam Exam Date & Time and Exam Format The midterm exam will be Tuesday, 3 April.
Computer Science 1620 Accumulators. Recall the solution to our financial program: #include using namespace std; int main() { double balance = ;
CS150 Introduction to Computer Science 1
ITC242 – Introduction to Data Communications ITC431 – Computer Networks Week 13 Exam Preparation.
Topic R3 – Review for the Final Exam. CISC 105 – Review for the Final Exam Exam Date & Time and Exam Format The final exam is 120-minutes, closed- book,
1 Midterm Review COMP 102. Tips l Eat a light meal before the exam l NO electronic devices (including calculators, dictionaries, phones, pagers, etc.)
CS 1 Lesson 5 Loops and Files CS 1 -- John Cole.
1 10/25/06CS150 Introduction to Computer Science 1 Reading from and Writing to Files.
VARIABLES, TYPES, INPUT/OUTPUT, ASSIGNMENT OPERATION Shieu-Hong Lin MATH/CS Department Chapel.
What does it take to make the most of Your Math Homework ?
1 Revision Before Exam-I. 2 Exam-I Scope l We discussed the scope of Exam-I and decided to move the topic of file handling to the final exam l A previously.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Synthesis ENGR 1181 MATLAB 11. Topics  No new material  Covers topics that will be on the Midterm 2 Exam MATLAB 01 – Program Design MATLAB 02 – Introduction.
1 CS161 Introduction to Computer Science Topic #10.
1 COMS 261 Computer Science I Title: String Class Date: October 3, 2005 Lecture Number: 14.
CS Midterm Study Guide Fall General topics Definitions and rules Technical names of things Syntax of C++ constructs Meaning of C++ constructs.
111/15/2015CS150 Introduction to Computer Science 1 Summary  Exam: Friday, October 17,  Assignment: Wednesday, October 15, 2003  We have completed.
“It was the night before midterm”. Midterm rule (March 16 nd, 2005) - Student ID is required. Open books, note exam - Don’t: - Leave the exam room after.
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
CS 376b Introduction to Computer Vision 01 / 23 / 2008 Instructor: Michael Eckmann.
1 10/18/04CS150 Introduction to Computer Science 1 Functions Divide and Conquer.
1 Chapter 7 Arrays. 2 Topics 7.1 Arrays Hold Multiple Values 7.2 Accessing Array Elements 7.3 No Bounds Checking in C Array Initialization 7.5 Processing.
 for loop  while loop  do-while loop for (begin point; end point ; incrementation ) { //statements to be repeated }
1 CS161 Introduction to Computer Science Topic #8.
Review for Final Exam. Contents 5 questions (20 points each) + 1 bonus question (20 points) – Basic concepts in Chapters 1-4 – Chapters 5-9 – Bonus: Chapter.
11/5/2016CS150 Introduction to Computer Science 1 Announcements  Assignment 6 due on Wednesday, December 3, 2003  Final Exam on Tuesday, December 9,
1 CS161 Introduction to Computer Science Topic #16.
1 10/15/04CS150 Introduction to Computer Science 1 Reading from and Writing to Files Part 2.
C++ Programming Lecture 19 Strings The Hashemite University Computer Engineering Department (Adapted from the textbook slides)
Lecture 15: Course Review BJ Furman ME 30 16MAY2011.
1 CS161 Introduction to Computer Science Topic #15.
1 CS161 Introduction to Computer Science Topic #6.
Arrays Chapter 7. Arrays Hold Multiple Values Array: variable that can store multiple values of the same type Values are stored in adjacent memory locations.
1 11/30/05CS150 Introduction to Computer Science 1 Structs.
CPS120 Introduction to Computer Science Exam Review Lecture 18.
Programming Fundamentals. Today’s Lecture Array Fundamentals Arrays as Class Member Data Arrays of Objects C-Strings The Standard C++ string Class.
CS162 - Topic #10 Lecture: Recursion –The Nature of Recursion –Tracing a Recursive Function –Work through Examples of Recursion Programming Project –Discuss.
LOOPS CHAPTER Topics  Four Types of Loops –while –do…while –for –foreach  Jump Statements in Loops –break –continue 2.
Accumulator Recursion CS125 Spring 2007 Arthur Kantor.
1 CSC103: Introduction to Computer and Programming Lecture No 9.
CSC Programming for Science Lecture 5: Actual Programming.
Introduction to Computer Science / Procedural – 67130
Midterm Exam Preperation
Unary Operators ++ and --
Review for Final Exam.
Beginning C for Engineers
CS150 Introduction to Computer Science 1
Review for Final Exam.
Functions Divide and Conquer
CS150 Introduction to Computer Science 1
do/while Selection Structure
CS148 Introduction to Programming II
Reading from and Writing to Files
OBJECT ORIENTED PROGRAMMING I LECTURE 4 PART 2 GEORGE KOUTSOGIANNAKIS
CS150 Introduction to Computer Science 1
ICS103: Programming in C 5: Repetition and Loop Statements
Reading from and Writing to Files
Presentation transcript:

1 CS161 Introduction to Computer Science Topic #17

CS161 Topic #172 Today in CS161 Review for the Final –What material are you responsible for –Suggestions on how to prepare... –Sample Questions What’s CS162 Like... –Material Covered in CS162 –Handouts for CS162

CS161 Topic #173 Information about the Final Exam The final will cover our in class lectures The final will also cover the reading assignments for the term; refer to the outline distributed during the first day for a list of these assignments It is a closed book and closed notes exam There will be questions asking you write functions and evaluate conditional expressions. There will be set of short answer.

CS161 Topic #174 Material Covered: Using functions, writing your own functions, function prototypes, actual and formal arguments (call by value versus call by reference), and return values The while statement, the for statement, and the do-while The increment and decrement operators, in both their prefix and postfix forms Arrays of characters and structures Text files

CS161 Topic #175 Sample Questions: Show how you would read in an array of characters from the keyboard. Make sure that you don’t read more characters than there is room for in the array: char name[20]; (Answer: cin.get(name,20); cin.get();)

CS161 Topic #176 Sample Questions: When should we use call by value instead of call by reference? (Answer: when you need a complete and duplicate copy of the data)

CS161 Topic #177 Sample Questions: What are the benefits of call by reference? –List 2 (Answer: 1) Can change original values of the actual arguments 2) Doesn’t require extra memory to hold a duplicate copy)

CS161 Topic #178 Sample Questions: Show how you would copy one array of characters (representing a “string”) into another, given: char original_name[20]; char copied_name[20]; (Answer: strcpy(copied_name, original_name);)

CS161 Topic #179 Sample Questions: Show how you would copy one array of characters (representing a “string”) into another, using a loop: Answer: int len = strlen(original_name); for (int i=0; i<=len; ++i) copied_name[i] = original_name[i];

CS161 Topic #1710 Think about: In the previous answer, understand why the following were used: –prefix increment versus postfix –strlen was used outside the loop instead of as the test condition –how to turn the for loop into a while loop or a do while loop –how to turn this into a function (called string_copy)...what would the args look like?

CS161 Topic #1711 Think about: What is the difference between the following two statements: given: char ch; cin.get(ch); versus cin >> ch;

CS161 Topic #1712 CS161 Introduction to Computer Science What’s CS162 Like?