CS 201 Course Description

CS201 PROGRAMMING IN C++ (3 Cr.)

COURSE DESCRIPTION

Prerequisite: CS122.

Offered: Fall

Description
CS 201 teaches how to program in C++. Topics include pointers, memory management, data structures, object-oriented design, and file processing.

Students with some programming experience, especially in C, may take CS201 concurrently with CS122.

Course Outline
We will teach basic data structures such as linked lists and circular buffers, file processing topics such as reading and writing files, and object oriented design topics such as constructors and destructors.

This course is a new course for us. As we gain experience we will of necessity modify this course outline.

  1. The Compiler and editor
  2. Basic C syntax
    1. #include files
    2. Variables
      1. Legal variable names
      2. Scoping rules
      3. Types
        1. The integer types (int, long, long long)
        2. The floating point types (float, double, long double)
        3. Strings
      4. Static and automatic storage classes
    3. Control structures
      1. If statements and Booleans expressions
      2. While, for and do loops
    4. Functions
      1. Basic functions and the return statement
      2. Void functions
    5. Input and output statements
      1. The difference between STDIN, STDOUT, and STDERR\
      2. The streams library (cin and cout)
      3. The stdio library (scanf and printf)
      4. Interactions between the two libraries
      5. Files
        1. Accessing files using streams
        2. Accessing files using open/read/write/close
    6. Objects in C++
      1. Why objects
      2. The protection classes public, private, and protected
      3. Contrasting member variables with local and global variables
      4. Basic object syntax
      5. Constructors
      6. Destructors
      7. Polymorphism
      8. Operator Overloading
    7. Data Structures and Algorithms
      1. Sorting
        1. O(n*n) sorts (i.e. bubble sort, shell sort)
        2. O(n logn) sorts (i.e. merge sort, quick sort)
        3. Comparison of the run time costs
      2. Binary Searching
        1. Basic algorithm
        2. Run time costs
      3. Pointers
        1. Why
        2. How to declare a pointer
        3. How to access a pointed at object
        4. Memory leaks
      4. Linked lists
        1. Basic operations (add, delete, search)
        2. Run time costs
          1. CPU time
          2. Storage costs
      5. Binary trees
        1. Unbalanced binary trees
          1. Basic operations (add, delete, search)
          2. Run time costs
            1. CPU time
            2. Storage costs
        2. Balanced binary trees
          1. Basic operations (add, delete, search)
          2. Run time costs
            1. CPU time
            2. Storage costs
            3. Comparing the balanced and unbalanced binary trees