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

 
 

 

 
Course Syllabus
CIS054 C/C++ Programming

Course Syllabus

Spring 2019
Summer 2019
Fall 2019

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
ASCII Chart
Mono: Run .NET programs on Linux, Unix
DevCpp - Free Windows C++ compiler (8 Mb).
NOTE: When using DevCpp, at the end of your program,
YOU need to prompt the user to press a key, and then
read the keyboard to prevent the DOS box from closing
as soon as the program ends.

COURSE INFORMATION
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.

M
o
d
u
l
e

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 of the lab assignment
Click PPT for PowerPoint slides desciption of the lab assignment
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)

0
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
 

1

Intro to Programming in C and C++
Introduction to Programming
C and C++ Keywords
Using a Development System

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

Lecture Topic #1: Hardware and software
 
Lecture Topic #2: Program organization
 
Lecture Topic #3: Naming rules and conventions
 
Lecture Topic #4: Editors, keywords, etc
 
Lecture Topic #5: The ASCII character set
 

Quiz: Chapter 1, Intro to C and C+

Lab Assignment #1 - Paycheck v1.0
Learn how to get your first program to compile and run.
  Project description and lab assignment
Choose either C or C++ for the project
Paycheck project lab report form

Frequently Asked Questions (FAQ)
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 MacOS Xcode       Click the following link for the FAQ on building a C++ program using Mac Xcode C with MacOS 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
assignments. 

Lab Assignment #2 - Syntax and Other Errors
Recognize and documents errors when bugs are placed in a program.
  Project description and lab assignment
Syntax, Logic and Run-time Errors - Lab Report

2
 

C/C++ Language Basics
Variables and assignments, Input and Output, data types, expressions, precedence of operators

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 Topic #1: C / C++ Data Types
  

Lecture Topic #2: Operators and Precedence
 
Lecture Topic #3: Console Input and Output

      C++ cout and cin
      If you are studying only C++, you can skip the
      discussion on scanf, but you should study printf

      C printf, scanf, gets
      If you are studying only C, you can skip the
      discussion on cout and cin

Lecture Topic #4: Number Systems
 

Quiz: Chapter 2, C/C++ Basics

IMPORTANT: Start a new project on Visual Studio, or Xcode, etc.
every time you start a new lab assignment.

Lab Assignment #1 - Players on a Team
Analyze a project description, make decisions using if...else if...else
Convert pseudocode into a program
 
Choose either C or C++ for the project
Players on a Team project lab report form

Lab Assignment #2 - Counting Change
Analyze a project description, create YOUR first program
 
Use the Paycheck program as a reference while you
develop the Counting Change program
Counting Change project lab report form

Lab Assignment #3 - Debugging

3

Decisions
Boolean expressions, multiway branches, exception handling basics

Homework Reading Assignment:
Choose the reading assignments depending on which
textbook (C or C++) you are using during the course.
C++ Textbook: Sections 3.1 and 3.2

Lecture Topic #1: Logical and Comparison Operators
 
Lecture Topic #2: DeMorgan, switch/case statements
 
Lecture Topic #3: Exception handling (try/throw/catch)
  (available only in C++, not C)

Quiz: Chapter 3, Program Flow


Discussion:
Privacy in the workplace

Lab Assignment #1 - Electric Bill
Analyze a project description. Convert the product description into code without the benefit of a sample program.
-- See instructor for this assignment --
Frequently Asked Questions
Click the following link for the FAQ on installing Visual Studio Try Throw Catch FAQ - C++ Exception Handling
Click the following link for the FAQ on installing Visual Studio Try Throw Catch FAQ - C scanf Error Handling
Click the following link for the FAQ on installing Visual Studio Reject non-numeric and negative inputs

Lab Assignment #2 - Rock-Paper-Scissors
Complete a program that uses multiway branches
 
Choose either C or C++ for your lab project
Sample code in C        Sample code in C++
Rock-Paper-Scissors project lab report form

Frequently Asked Questions
Click the following link for the FAQ on installing Visual Studio input only 1 character with cin or scanf
Click the following link for the FAQ on installing Visual Studio scanf_s
Click the following link for the FAQ on installing Visual Studio scanf skips to end of the program

4

Loops
Counting loops - from 0 or 1, sentinel value loops
while loop, do...while loop, for loop, nested loops
break and continue statements

Homework Reading Assignment:
3.3 More About Loops
3.4 Designing Loops

Lecture Topic #1: More on the if...else if...else
 
Sample code for the discussion
Code in C     Code in C++     Code in Java

Lecture Topic #2: C and C++ for loop
  Loop initialization, body and increment


Quiz:
Chapter 3, Loops

Lab Assignment #1 - Sum and Range of Numbers
Analyze a project description
Determine odd or even using if...else
Determine the smallest and largest input value
Use a while statement to loop a program
Convert pseudocode into a program
 
Choose either C or C++ for the project
Add input validation to reject negative numbers and non-numeric data.
Refer to the code for the Players on a Team project.
Sum and Range of Numbers lab report form
Extra Credit: Compute the average of all numbers and display with
two digits past the decimal place. Refer to the Paycheck v1 project
on how to display a number with two digits past the decimal.

Lab Assignment #2 - Compute PI (using a loop)
PI can be computed using an infinite series of numbers.
The lab computes PI using a loop of 'n' terms.

      Compute pi C-language version (PPT/PDF)
      Compute pi C++ language version (PPT/PDF)
Compute PI project lab report form

5

Functions - Part 1
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

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

Quiz:
Chapter 4, Functions

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

6

 

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

Scope and visibility
Local vs. global variables
Recursion
Overloading C++ functions

Quiz:
Chapter 4, Scope and Visibility

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

Discussion:
Ethics in the Computer Field

7

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

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

Quiz:
Chapter 5, More on Functions

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

8

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

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

Quiz:
Chapter 6, I/O Streams

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

9

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

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

Quiz:
Midterm, Chapters 1-7

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

10
 

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

C++ Strings vs. C Strings
Searching and manipulating C strings
Searching and manipulating C++ strings
C++ Vectors

Midterm Exam:
Chapter 8, Strings

Lab Assignments:
1) Sentence Formatting
2) String Manipulation

11

Pointers and Memory Allocation
Homework Reading Assignment:
9.1 Pointers
9.2 Dynamic Arrays

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

Quiz:
Chapter 9, Pointers, Dynamic Arrays

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

12

Structures and Objects
Homework Reading Assignment:
10.1 Structures
10.2 Classes
10.3 Abstract data types
10.4 Introduction to inheritance

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

Quiz:
Chapter 10 - Structures and Objects

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

13

Bit Manipulation and More on C++ Objects
Homework Reading Assignment:
11.1 Friend functions
11.2 Overloading operators
11.3 Arrays and classes
11.4 Classes and dynamic arrays

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

Quiz:
Bit Manipulation, Overloading

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

Discussion:
Artificial Intelligence

14

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

Quiz:
Preprocessor, Inheritance

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

15

Building Large Project
Homework Reading Assignment:
12.1 Separate compilation
12.2 Namespaces

Separate Compilation
Multiple Header Files
The MAKE Utility
Namespaces

Quiz:
Namespaces, etc.

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

16

Final and Final Project

Final Exam


 

Final Lab Project