COSC 181 Foundations of Computer Programming Class 31 Test Review 1 Next Test Mon Apr 20th Comprehensive Focusing on Material since last test Chapter 6 and Chapter 7 2 Test Review Same Basic Format Short Answer or Multiple Choice Section Code Tracing Find the Errors Writing Code Syntax matters 3 Previously Covered Material Previously covered material Chapters 1 4 Intro to Computers Internet and the WWW Introduction to C Programming Introduction to Classes and Objects Defining Classes Name Return type Parameter Control Structures Part 1 If else while counter sentinel assignment operators etc 4 Key topics from before Objects and their relation to classes Basic kinds of errors Input and Output Streams Including library files Escape Sequences Variable Declaration and Assignment Basic operators Use Case Class and Activity Diagrams Writing Classes syntax Private vs Public Constructors Requirements Specification Classes Using Strings 5 Key topics from before con t How to use a header file Seperating functionality from interface Difference between functionality and interface Now as it relates to Divide and Conquer Counter initialization Loop Continuation Condition Counter update Be able to tell how the looping works given a for statement Types of Control Structures Combining Control Structures Top down step wise refinement Casting Using for loops 6 Previously covered material Chapters 5 6 first half Control Statements Part 2 for statement do while loop switch break and continue Logical operators EOF and ASCII Introduction to functions 7 1 Fig 5 7 fig05 07 cpp 2 do while repetition statement 3 include iostream 4 using std cout 5 using std endl 6 7 int main 8 9 Outline Declare and initialize control variable counter 7 cpp int counter 1 initialize counter 10 11 do 12 do while loop displays counter s value before testing for counter s final value 13 cout counter display counter 14 counter increment counter 15 fig05 0 1 of 1 while counter 10 end do while 16 17 cout endl output a newline 18 return 0 indicate successful termination 19 end main 1 2 3 4 5 6 7 8 9 10 8 New Key Topics con t Logical Operators logical AND logical OR logical NOT Truth Tables for each Short circuit evaluation Structured Programming 9 Chapter 6 First Part Key Concepts Divide and Conquer Functions What are they why are they important How do we write them use them Ways to tell if your function is too complex How function calls work pow x y sqrt x How do you use must include cmath 3 ways that functions may return Declaration vs Definition Parameter Coercion Global functions Functions with multiple parameters C Standard Library Functions What is the C Standard Library Using Random Numbers 10 Chapter 6 Second Part Key Concepts Identifier attributes Name Type Size and Value Scope Storage Classes automatic vs static variables Function scope File scope Block scope Function prototype scope Note global variables are static by default Principle of Least Privilege Scope Rules Rules for each of the following Function call stack and activation records Pushing Popping LIFO Parts of an activation record Stack Overflow 11 Pass by Reference vs Pass by Value Understand the conceptual difference Understand the syntactical difference Syntax Must have all the right most elements be defaulted How used Proper syntax Using references outside of parameter lists Default arguments Unary scope resolution operator Overloaded functions Function Templates template class T class S 12 Recursion When a function calls itself 2 items needed to successfully recurse Review the Examples Pros and Cons of Recursion 13 Chapter 7 Arrays How declared Initialization several methods How to use for loops with arrays What are magic numbers Why are they bad Study the examples that we gave 14 Student Feedback Any questions from you Anything you need clarified 15
View Full Document