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 for a Frequently Asked Question (FAQ)
|
0
|
Course Outline and Orientation
Important and Useful Information
Class Orientation
Course Navigation
Introduction to Canvas
Tour of Canvas by Instructure |
|
|
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+
Homework Reading Assignment:
Choose the reading assignments depending on which
language (C or C++) you are using during the course.
C Textbook - Chapter 1
C++ Textbook - Chapter 1
|
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)
Installing
Visual Studio
scanf_s
Visual
C++ precompiled header error
Visual
C++ COFF error
end1
error when using C++
C++ with MacOS Xcode C
with MacOS Xcode
Hints
for using Code::Blocks instead of Visual Studio or Xcode
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 - Chapter 2
C++ Textbook - Chapter 2
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 - Chapters 3 and 4
C++ Textbook - Chapters 3 and 4
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 - 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
Lab Assignment #2 - Electric Bill
Analyze a project description. Convert the product description into code
without the benefit of a sample program.
-- This assignment is being updated --
Frequently Asked Questions
Try Throw Catch FAQ - C++ Exception Handling
Try Throw Catch FAQ - C scanf Error Handling
Reject non-numeric and negative inputs
Frequently Asked Questions
input only 1 character with cin or scanf
scanf_s
scanf skips to end of the program
|
|
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:
C Textbook - Chapter 5
C++ Textbook - Chapter 5
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 project
on how to display a number with two digits past the decimal.
Lab Assignment #2 - Compute PI (using a loop)
This assignment may be replaced before assigned
as a class project
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
|
|
Functions - Part 1
Homework Reading Assignment:
C Textbook - Chapter 6
C++ Textbook - Chapter 6
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) Cell Phone Call (use a function)
2) Predefined functions
3) Debugging functions
|
|
Functions - Part 2
Homework Reading Assignment:
On Canvas
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
|
|
Functions - Part 3
Homework Reading Assignment:
On Canvas
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
|
Lecture Topic #1: Introduction
to Arrays |
|
An array holds multiple data items, each
of which must be the same data type.
Information from the discussion
Sequential Search
Code from discussion
States.txt (data file) |
Lecture Topic #2: Parallel Arrays |
|
If you have different types of data, for example
characters for customer names and numeric data for
balances, you can use one array for the names and
another for the balances and have the same position in
each array relate to an individual customer.
Code from discussion
|
LECTURE TOPIC #3: Array of Records |
|
A better way is to create a structured
'record' that
contains all the information for a single customer. Then
create an array of records. Then the array can be all of
the same data type - the customer record.
Code from discussion |
Quiz:
Midterm, Chapters 1-7
|
Lab Assignment #1: Tic-Tac-Toe Lab Assignment
TicTacToe Lab Project Discussion - PPT
TicTacToe.cpp (source code - incomplete - You need to finish the program)
hints on how to Check for a Winner - PPT
TicTacToe Project & Lab Report
Lab Assignment #2: Tax Table Lookup
Tax
Estimator Video 16:29 (cc)
Tax Estimator PPT/PDF
Tax Estimator sample C++ code
Tax
Estimator sample C code
HINTS: The lab project requires that you implement
Standard Deductions using an array. I suggest that you modify the function:
double
inputDeductions(int taxpayerStatus)
- Ask the user to select either Standard Deduction or Itemized Deduction
- If itemized deductions are selected, the use the rest of the code in the function that asks for the amount of the deductions, then reads the amount of deductions from the keyboard.
- If standard deductions are selected, use the TaxPayerStatus (known
as s in the inputDeductions function) to lookup the deductions
from the array you create for standard deductions. You only need to
create a single-dimensional array of type double that contains the amount
of standard deductions. NOTE: the actual TaxPayerStatus has a value
from 1 to 5 and arrays are indexed starting at 0. You need to make some
adjustment when indexing into the array.
Try to complete the modifications to the Tax Estimator program on your own.
You will learn a lot this way. If you are still having a problem, consult
the FAQ.
Help implementing the standard deductions
Tax Estimator Lab Assignment and Lab Report
|
9
|
Accessing Files
Major changes to these assignments from previous
semesters
may occur. Prepare for new material to be presented.
Homework Reading Assignment:
On Canvas
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:
|
|
Character and String Manipulation
Homework Reading Assignment:
C Textbook - Chapter 7
C++ Textbook - Chapter 8
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
|
|
Pointers and Memory Allocation
Homework Reading Assignment:
On Canvas
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 (may be replaced with a new
project)
2) Extra Credit Lab
|
|
Structures and Objects
Homework Reading Assignment:
C Textbook - Chapter 9
C++ Textbook - Chapter 8
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
|
|
Bit Manipulation and More on C++ Objects
Homework Reading Assignment:
On Canvas
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
|
|
C/C++ Preprocessor C++ Inheritance
Homework Reading Assignment:
On Canvas
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
2a) C++ Derived School Majors
2b) C Bit Manipulation
|
15
|
Building Large Project
Separate Compilation
Multiple Header Files
The MAKE Utility
Namespaces
Quiz:
Namespaces, etc.
|
Lab Assignments:
1) Movie Ratings (may be replaced with a new project)
2) ADT Digital Time
|
16
|
Final and Final Project
Final Exam
|
Final Lab Project
|