Review_Final

advertisement
Review for Final Exam
It will be on Dec 14 (Wednesday) 1:15-3:15pm in Cheek Hall 209. Chapters 1-10 from
the textbook are covered.
Topics:
Chapter 1: Introduction to Computers and Programming
Computer systems: hardware and software
Source code, object code, and executable code
Keywords, variables,
The programming process, the meaning of software engineering
Procedural and object-oriented programming
Chapter 2 Introduction to C++
The parts of a C++ Program: comments, preprocessor directives, namespace, and main
function.
cout object
Variables and literals
Identifiers
Data types: integer, floating-point, char, and bool.
The scope of variables.
Arithmetic operators.
Chapter 3 Expression and Interactivity
cin object
Mathematical expression: precedence and associativity
Mathematical library functions
Type conversion and type casting
Named constants
Combined assignment operators
Formatting output and input
File Input and Output, including how to check opening file errors, and detecting the end
of files.
Chapter 4 Making decisions
Relational operators, relational expressions and logical operators.
Evaluation of expressions
The if statement
The if/else statement
The if/else if statement, using a trailing else
Menus
Comparing strings
Input validation
Conditional operator
Switch statement
Testing for file open errors.
Chapter 5: Looping
Increment and decrement operators
The while loop
The do-while loop
The for loop
Nested loops
Break statement
Continue statement
Chapter 6: Functions
How to declare, define and call functions, know how to write such programs
Know the execution procedure of function calls
Passing data by value, or by reference to a function
The meaning of return statement
Know how to return a value from a function
Local and global variables
Static local variables
Default arguments
Overloading functions
The exit() function
Chapter 7 Arrays
Know the meaning of arrays
How to declare an array (note specifying the size of an array)
How to access array elements
How to initialize an array
Arrays as function arguments
Parallel arrays
Two-dimensional arrays
Know STL vector
Chapter 8 Searching and sorting arrays
Linear search
Binary search
Bubble sorting
Selection sorting
Understand the above four algorithms, and know how to implement them in C++
Chapter 9 Pointers
Address operator and indirection operator
Pointer variables, and how to do arithmetic operation on pointer variables.
Know what are legal operations and initializations
The relationship between arrays and pointers
Pointers as function parameters (call by reference)
How to return pointers from functions
Dynamical memory allocation (new and delete operators)
Chapter 10 Characters, Strings, and the string class
Character functions for testing and case conversion.
Library functions for working with C-strings.
Cin>>, cin.get(), cin.getline, and getline function for string class.
String/Numeric Conversion Functions
The C++ string Class.
The types of problems in Final Exam include True/False, Multiple choice, short answer
and programming, just like types of problems in Midterm.
Download