Skip to main content
UCLA

Program In Computing

PIC 10B: Intermediate Programming

About

In this C++ course, students learn how to manage memory on the heap and how to implement data structures like linked lists and binary search trees together with their iterators. Many useful aspects of the C++ language are covered such as operator overloading, and copy and move semantics.

Course Description

Lecture, three hours; discussion, one hour. Object oriented programming in C++; operator overloading; memory management, copy and move constructors, copy and move assignment operators, destructors; iterators; data structures and their implementation, linked lists, binary search trees; inheritance and polymorphism; recursion, algorithms for sorting and searching. P/NP or letter grading.

Learning Outcomes / Course Objectives / Core Competencies

Incoming students should be able to...

After successful completion of PIC 10B, students should be able to...

General Course Outline / Schedule of Lectures

At least four lectures should be dedicated to each of the following major topics. Instructors are encouraged to spent longer on efficient memory management and operator overloading in order to explain copy constructors, move constructors, copy assignment operators, move assignment operators, and destructors sufficiently.

efficient memory management

  • stack and heap
  • pointers, new and delete expressions, memory leaks, RAII
  • lvalue and rvalue references, copy and move constructors, destructors

operator overloading

  • binary vs unary, member vs non-member distinctions
  • comparison operators, arithmetic operators, prefix and postfix ++ and --
  • operator<<, operator>>, subscript, call, and conversion operators
  • this and friend keywords
  • assignment operator (copy, move, copy and swap idiom)

data structures

  • implementing linked lists and binary search trees with iterators
  • implementing other structures of the instructor's choice
  • some containers available in the standard library

inheritance and polymorphism (single inheritance cases only)

  • virtual, override, protected keywords
  • polymorphism for pointers and references
  • slicing, up and down-casting, dynamic casts

recursion

  • sorting algorithms
  • searching algorithms
  • algorithm complexity and big-O notation

Expected Grade Scheme and Homework Assignments

PIC 10B instructors are required to assign at least four homework assignments.