Home

CS 1570: Intro to Programming C++

This course will teach you to program using the C++ programming language. You will learn the syntax of C++, how to interact with users, and how to write some basic algorithms.

Syllabus


Gradesheet

Homework Assignments

(Solutions)

Extra Credit



Resources

References

Schedule



Topics
Week 1
  • Class intro & syllabus
  • Overview of computer hardware and software
  • Compilers
  • Algorithms
  • C++ Hello World
Week 2
  • Variable naming
  • Variable types (numeric, boolean, string, character)
  • Constants
  • Arithmetic operators
Week 3
  • Arithmetic, assignment, relational, and logical operators
  • Integer division & static casts
  • If-else statements
  • While statements
Week 4
  • Do-while statements
  • For statements
  • Switch-case statements
Week 5
  • The ternary operator
  • endl vs. \n
  • Escape sequences

Exam 1

Week 6
  • Function prototypes and definitions
  • Return types
  • Arguments; pass-by-value vs. pass-by-reference
  • The call stack
  • Documentation: pre- and post-conditions
Week 7
  • Overloading functions
  • Static variables
  • Separate file compilation
  • Template functions
Week 8
  • Default arguments for functions
  • Generating random numbers
  • Structs
  • Arrays
Week 9
  • Passing arrays to functions
  • A sorting algorithm
  • Null-terminated character arrays
Week 10
  • Null-terminated character arrays

Exam 2

Week 11
  • Character input: getline, ignore, get
  • File I/O
Week 12
  • Object-oriented programming: classes, encapsulation, data hiding
  • Public and private member variables
  • Public and private member functions
  • Accessors/mutators
  • Friend functions
Week 13
  • Constructors & copy constructors
  • Overloading operators
Week 14
  • Overloading special operators (=, [], ())
  • Template classes
  • Static member variables and functions
Week 15
  • Output formatting
  • Namespaces

Exam 3

Week 16
  • Enums
  • Command line arguments
  • Miscellaneous other topics

Final Exam