Prof. Dennis Anderson
Outline
Week 1: Introduction to Computers and the CV Language: A discussion of how C++ is used. C++ is compared with PASCAL and with COBOL; A review of basic programming concepts: We will discuss what a program is and how it is created; What an algorithm is. We will study examples of algorithms; Discuss the distinction between the programmer and the user. Discuss examples of input, processing, and output, and the instruction set of the computer.
Week 2: Structure of a C Program: The fundamental elements of C++ are introduced: The difference between compiler directives and executable instructions is explained; We will discuss a C++ program with a While loop; The concept of variables is reviewed; The functions of the memory and the CPU are reviewed; We will discuss how and why variables are declared; We explain numeric expressions and numeric operators; Review functions and assignment statement; Show how input and output are conducted in C++.
Week 3: Data types and how they are used; More on operators: Integers: short, int, long; unsigned; Real: double; Characters: ASCII; Character Input and Output; Identifier and naming conventions; Converting characters to numbers; Operators: Arithmetic operators; Integer Arithmetic; Floating point arithmetic; Unsigned arithmetic; Unary minus; Relational operators; Logical operators; Evaluation order; Bit-wise operators; Assignment operators; Automatic type conversion.
Week 4: Types of statements: Expression statements; Compound statements; Simple decision statements: "if"; Assignment decisions: The conditional operator; Multiple "else if"; "switch" statement; Simple loops: "while", "do while"; "for" loop; Null statement; "break", "continue" and "goto"; Concise control expressions.
Week 5: Decisions; We will go over a number of programs involving decisions; Review the "if" and "else" and show how they are written in C++; Discuss Boolean expressions; Review Boolean and relational operators; Discuss the inclusive and exclusive OR operators; Introduce Truth Tables; Introduce enumerated types; Switch statement.
Week 6: Functions: The function call and the function arguments; Function returns; Return type; Function body; Character strings; Global and local variables; Scope; Modular programming; Side effects; The Return statement; Formal parameters and actual parameters; Passing parameters; Value parameters; Reference parameters; To-down approach; Stepwise refinement.
Week 7: Midterm.
Week 8: Iteration: Why iteration is needed. The For loop; Loop index variable; Nested For loops; Do while loops; Choosing the appropriate loop structure; Break statement; While loop conditions and the data type Float; Verifying loops; Infinite loops; The trailer value method; The EOF function.
Week 9: Arrays and strings: What an array is; Creating arrays; Subscripts; Using computed subscripts; Array processing loops; Out-of-bounds errors; Passing arrays to functions; Debugging Arrays; Strings; Null character; Sorting arrays; Selection sort; Insertion sort; Quicksort; Two-dimensional arrays; Passing two-dimensional arrays to functions; Initializing two-dimensional arrays; Drawing shapes.
Week 10: User defined data types and object oriented programming: Benefits of object oriented programming; Data type: time; Classes; Class definitions; Clients; Objects; Instances; Initializing objects; Constructor; Member functions; Member function prototypes.
Week 11: More on object-oriented programming: Abstract data types; Changing data representation; Accessory function; Overloading; Operator overloading; Overloaded operators as member functions; Inheritance; Polymorphism; Templates; Debugging classes.
Week 12: More on object-oriented programming: "inline" and "const"; Uses of void; Scope resolution operator; Reference declarations and call by reference; Default arguments; "new " and "delete" operations; "struct"; private and public; static members; class scope; "this" pointer.
Week 13: Pointers and lists; Character data: Pointer; Address; "address of" operation; Null pointer; Dereferencing; Arrow notation; Stack; Stack frame; Linked list: Head ,Tail; List operations as member functions; Debugging programs with lists; Characters; Space Character; Non-printing characters; Escape character; Character operations.
Week 14: Recursion: How to write a recursive function; Example of recursion; Debugging recursive functions; Nonlinear recursion; Recursive algorithms; Divide and conquer approach; Constructing index entries; Merging and splitting lists; Arithmetic on very large integers; Mutual recursion; Curve drawing.
Week 15: Multiple-file applications: Input and output; Separate compilation; Linker; Stream library; Opening a file; closing a file; Command-line arguments; A picture specification language; Parsing; Lexical analysis; Tokens; Nodes; Children and parents.
Resources: World Wide Web Sites including Borland.
Connect with Us