C/C++ Programming
San José City College CIS054
Login to Canvas  SJCC registration  assist.org Community College courses vs. University courses
Instructor: Dan McElroy
e-mail: Dan.McElroy@sjcc.edu
Dan's YouTube channel Dan McElroy's YouTube channel
Textbooks are listed on the syllabus
9th editon image  Problem Solving with C++ /8e


Course Syllabus
CIS054 C/C++ Programming

Course Syllabus

Spring 2018
Summer 2018
Fall 2018

  Spring 2017
Summer 2017
Fall 2017

Spring 2016
Summer 2016
Fall 2016

Summer 2015
Fall 2015

Handouts and other Goodies
Mono: Run .NET programs on Linux, Unix
DevCpp - Free Windows C++ compiler (8 Mb).
NOTE: YOU need to prompt the user to press a key,
and then read the keyboard at the end of your
program to prevent the DOS box from closing as soon
as your program ends.

The CIS054 C/C++ course is organized into modules. Each module contains one or more lecture topics and one or more lab assignments.
Students are expected to spend about 9 hours on each module. This includes viewing the lectures either on video or PowerPoint, textbook
readings, quizzes and lab assignments. The time commitment should be the same for an online course as an on-campus course.

This webpage contains many but not all of the links to the videos and PowerPoint presentations for the CIS054 C/C++ Programming class.
Several of the lab assignments are taken from the texbook, and due to copyright restrictions are only available on the class Canvas website
to students registered in the course.


Homework, Lecture and Quiz

Click Video for a video of the lecture
Click PPT for a PowerPoint of the lecture
Click for support files

Unless otherwise noted, when a link to PowerPoint slides
are on the same line as a link to a video, they both cover
the exact same information.

Lab Assignments

Click Video for a video desciption
Click PPT for PowerPoint slides desciption
Click Word for the lab assignment / lab report form
  Click for sample code in C or C++
Click the following link for the FAQ on a C++ end1 error Click for a Frequently Asked Question (FAQ)

Course Outline and Orientation

Important and Useful Information
Orientation information in a YouTube video Orientation information in a PDF file Class Orientation
Orientation information in a YouTube video Information on Canvas in a PDF file Course Navigation
Information on Canvas in a PDF file Introduction to Canvas
Orientation information in a YouTube video Tour of Canvas by Instructure


Intro to Programming in C and C++

Homework Reading Assignment:
Read chapter 1 - introduction and several helpful hints.

Program Organization
Editors, keywords, etc
The ASCII Character Set

Quiz: Chapter 1, Intro to C and C+

Lab Assignment #1 - Paycheck v1.0
Paycheck project description
Choose either C or C++ for the project
Paycheck project lab report form

Click the following link for the FAQ on installing Visual Studio Installing Visual Studio
Click the following link for the FAQ on scanf_s scanf_s
Click the following link for the FAQ on C++ Precompiled header error Visual C++ Precompiled header error
Click the following link for the FAQ on a C++ COFF error Visual C++ COFF error
Click the following link for the FAQ on a C++ end1 error end1 error when using C++

Click the following link for the FAQ on building a C++ program using Mac Xcode C++ with Xcode       Click the following link for the FAQ on building a C++ program using Mac Xcode C with Xcode

Click the following link for the PDF discussion file Hints for using Code::Blocks instead of Visual Studio or Xcode
Click the following link for the PlayersOnTeam lab YouTube video Video on installing Code::Blocks 7:53 (cc)

IMPORTANT! The Paycheck assignment shows how to display two
digits past the decimal. Make sure you see how this works. You will
need to set the number of digits past the decimal in several future

Lab Assignment #2 - Syntax and Other Errors
Syntax, Logic and Run-time Errors - Lab Assignment
Syntax, Logic and Run-time Errors - Lab Report Form


C/C++ Language Basics
Homework Reading Assignment:
Choose the reading assignments depending on which
textbook (C or C++) you are using during the course.

C Textbook: Sections 2.2 through 2.7, -or-
C++ Textbook: Sections 2.1 through 2.5

Lecture #1: C / C++ Data Types
Lecture #2: Operators and Precedence
Lecture #3a: C++ cout and cin
      If you are studying only C++, you can skip the
      discussion on scanf, but you should study printf

Lecture #3b: C printf, scanf, gets
      If you are studying only C, you can skip the
      discussion on cout and cin

Lecture #4: Number Systems

Quiz: Chapter 2, C/C++ Basics

Lab Assignment #1 - Players on a Team
Players on a Team project description
Choose either C or C++ for the project
Players on a Team project lab report form

Lab Assignment #2 - Counting Change
Counting Change project description
Use the Paycheck program as a reference while you
develop the Counting Change program

Counting Change project lab report form

Lab Assignment #3 - Debugging


Logical and Comparison Operators
Boolean expressions
Different IF statements
Case statements
Multiway branch

Illegal inputs detected by cin
Illegal inputs detected by scanf
C++ Exception handling (Try...Throw...Catch)

Homework Reading Assignment
3.1 Using Boolean Expressions
3.2 Multiway Branches

Chapter 3, Program Flow

Lab Assignments
1) Electric Bill (Exception Handling)
2) Rock-Paper-Scissors

Privacy in the workplace


counting loops - from 0 or 1
sentinel value loops

while loop
do...while loop
for loop
nested loops

break statement
continue statement

Homework Reading Assignment
3.3 More About Loops
3.4 Designing Loops

Chapter 3, Loops

Lab Assignments
1) Sum and Average of Numbers
2) Compute PI (using a loop)


Functions - Part 1
Top-Down Design
Predefined Functions
Header files - C vs. C++
Programmer-defined Functions
Procedural Abstraction
The 'Call' stack

Homework Reading Assignment:
Read chapter 16, Exceptions
Read chapter 4 - 1st half
4.1 Top-down Design
4.2 Predefined Functions
4.3 Programmer-defined Functions

Chapter 4, Functions

Lab Assignments:
1) Long Distance Call (use a function)
2) Debugging functions



Functions - Part 2
Scope and visibility
Local vs. global variables
Overloading C++ functions

Homework Reading Assignment:
4.4 Procedural Abstraction
4.5 Scope and Local Variables
4.6 Overloading Function Names

Chapter 4, Scope and Visibility

Lab Assignment:
1) Menu Driven Metric and English
2) Fast Food Restaurant

Ethics in the Computer Field


Functions - Part 3
void Functions
Call-by-pointer parameters
Call-by-reference parameters (C++)
Using procedural abstraction
Testing and debugging functions

Homework Reading Assignment:
5.1 void functions
5.2 Call by reference
5.4 Debugging Functions

Chapter 5, More on Functions

Lab Assignments:
1) Rolling Dice
2) Length of a Line (Pythagorean)

Accessing Files
File streams
Reading and writing files
Sequential access files
Random access files
C-fopen, rwx+
C-feof, fclose
C-fseek, unlink
C++ ifstream, ofstream
C++ eof, open, close
C++ seek

Homework Reading Assignment:
6.1 Streams and File I/O
6.2 Tools for Stream I/O
6.3 Character I/O

Chapter 6, I/O Streams

Lab Assignments:
1) Range, Mean, Median of a File
2) Automatic Teller Machine

Organizing data into arrays
Passing arrays to functions
Programming with arrays
Multidimensional arrays
Arrays of Structures

Homework Reading Assignment:
7.1 Introduction to Arrays
7.2 Arrays in Functions
7.3 Programming with Arrays
7.4 Multidimensional Arrays

Midterm, Chapters 1-7

Lab Assignments:
1) Tic-Tac-Toe
2) Tax Table Lookup
3) Roll Dice Histogram


Character and String Manipulation
C++ Strings vs. C Strings
Searching and manipulating C strings
Searching and manipulating C++ strings
C++ Vectors

Homework Reading Assignment:
8.1 Array Type for Strings
8.2 The C++ string class
8.3 Vectors

Midterm Exam:
Chapter 8, Strings

Lab Assignments:
1) Sentence Formatting
2) String Manipulation


Pointers and Memory Allocation
Declaring and dereferencing pointers
Memory allocation in C and C++
Returning memory to freespace in C and C++
Dynamic arrays in C and C++

Homework Reading Assignment:
9.1 Pointers
9.2 Dynamic Arrays

Chapter 9, Pointers, Dynamic Arrays

Lab Assignments:
1) Reservation System
2) Extra Credit Lab


Structures and Objects
Structures, unions and enumerators
Structures vs. Classes (C++)
Abstract data types
The this pointer (C++)

Homework Reading Assignment:

10.1 Structures
10.2 Classes
10.3 Abstract data types
10.4 Introduction to inheritance

Chapter 10 - Structures and Objects

Lab Assignments:
1) Student Grading
2) Binary Search of Structured Records


Bit Manipulation and More on C++ Objects
Masking and inserting bits
Shifting bits left and right
Friend functions (C++)
Overloading operators (C++)
Arrays and classes (C++)
Classes and dynamic arrays (C++)

Homework Reading Assignment:
11.1 Friend functions
11.2 Overloading operators
11.3 Arrays and classes
11.4 Classes and dynamic arrays

Bit Manipulation, Overloading

Lab Assignments:
1) Date object - C and C++
2) Rational Numbers - C and C++

Artificial Intelligence


C/C++ Preprocessor C++ Inheritance
File Inclusion
Macro Substitution
C++ Inheritance
C++ Polymorphism
C++ Virtual functions

Homework Reading Assignment:
15.1 Inheritance basics
15.2 Inheritance details
15.3 Polymorphism

Preprocessor, Inheritance

Lab Assignments:
1) Different Record Types
2) C++ Derived School Majors

Building Large Project
Separate Compilation
Multiple Header Files
The MAKE Utility

Homework Reading Assignment:
12.1 Separate compilation
12.2 Namespaces

Namespaces, etc.

Lab Assignments:
1) Movie Ratings
2) ADT Digital Time

Intro to Data Structures
Introduction to data structures
Pointers and linked lists
Nodes and linked lists
Stacks and queues

Homework Reading Assignment:
13.1 Nodes and linked lists
13.2 Stacks and queues

Data Structures

Final and Final Project