Description: CP0 is designed to teach students who have little or no prior exposure to programming how to think computationally and write programs to solve non-trivial problems. The course is taught in a problem driven fashion, where language features and programming techniques are demonstrated using code to solve example problems. The course uses C++, but will focus on the procedural parts of C++ that are largely shared by Java and C. The goal of is not to teach the C++ language, but rather to teach how to program. Emphasis is on effective usage of primitive data types, expressions, control statements, arrays, functions, strings, bit operations, and a few classes in STL (e.g., vector, pair, string).
Pre-requisite: High School Geometry
Expected Workload: There will be 10 topics, each having one problem set. Each topic has videos between 1 hour and 2 hours, and 4 to 10 additional hours for homework problems.
Instructor: Ninghui Li
Course Material | Concepts | Additional Info | |
Topic 1 Introduction |
Comments, whitespaces, pre-processors (include and macros), variables, declaration, int type, expressions, operators, assignment (=, +=, ++), compound statements, input/output, if statement, comparison operators, logical operators, literals. |
|
|
Topic 2 For Loop and Function |
Data types: float, double, bool. For loop. String literals. Escape characters. Macro expansion. Functions. Math functions. Overflow. Implicit conversion. |
|
|
Topic 3 Array I |
|
|
|
Topic 4 Array II |
|
|
|
Topic 5 Elementary Sorting |
|
|
|
Topic 6 Using Sorted Array |
|
|
|
Topic 7 String |
|
|
|
Topic 8 Number Representation |
|
|
|
Topic 9 Mergesort and Quicksort |
|
|
|
Topic 10 Set and Map |
|
|