CS 120: Computer Science I

Instructor: Michael Wilder
Email: mdwilder@uidaho.edu
Office Hours: MWF 12:30-1:20 in JEB 226 (or by appointment)


Syllabus

Get it here

Announcements

Connecting to Course Server from Off Campus
In order to connect to the course server from off campus, you will need to use a Virtual Private Network (VPN) supported by the university. To get the VPN and install it on your personal computer, refer to the instructions located here.


Reference Materials

Overview of UNIX
Help With the VPN

Course Schedule

Note that this schedule is a guide and will likely change over the course of the semester.

Week DatesTopicChaptersAssignment/LabComments
1 1/10-1/12 Introduction to Computers and Programming Chapters 1 and 2 There are no labs this week.
Assignment 0 Lab 1 Assignment 1
Course intro. Programs and executables. Compilers and text editors. Output.

hello.cpp Basic Hello, World code using cout.
fortune.cpp Fortune teller program.
2 1/15-1/19 Variables and I/O Chapter 2
Variables 1
Variables 2
Variable Names
If Statements
If Statements in Code
Expressions
Lab 2
Assignment 2
No class Monday Jan. 15 (Idaho Human Rights Day)

Text editors (nano, vi, etc). Basic unix commands. Variables, basic I/O, conditionals, Boolean logic.
Mathematical expressions and typecasts.
3 1/22-1/26 Loops Chapter 3
Conditionals
Conditionals in Code
While Loops
While Loops in Code
Lab 3
Assignment 3
Conditionals: if; loops; Boolean logic.

Code for a calculator is here.
Code for the game of nim is here.

List of C++ operators
List of C++ keywords (reserved words)
4 1/29-2/2 More Loops Interlude 1, Chapter 3
Do-While Loops
Do-While Loops in Code
For_Loops
For Loops in Code
Lab 4
Assignment 4
More Loops: while, do-while, and for.

Code for the calculator for lab 4 is here.
5 2/5-2/9 Functions, scope Chapter 4
Function Example 1
Function Example 2
Lab 5
Assignment 5
Functions: arguments, return values, and scope. Switch statements. Structures.
6 2/12-2/16 Testing and Classes Interlude 2 and Chapter 5
Intro to Classes
Classes in code part A
Classes in code part B
Classes in code part C (constructors)
Lab 6
Assignment 6
Testing, classes, objects, data members, member functions, dot notation.

Code for the pet example is here.
7 2/19-2/23 More Classes Chapter 5
Binary
Hexadecimal
Assignment 7
Lab 7

No class Monday Feb. 19 (Presidents Day).

A sample exam is here.

Lab 7 Example Code

Visibility specifiers: public and private.
Opening, reading, and writing files.

*** Midterm Exam 1 on Friday, Feb 23 ***
8 2/26-3/1 Software design; arrays, binary Interlude 3, Chapter 5
Arrays
Arrays_in_code
Assignment 8
Lab 8

Design: top-down, bottom-up.

Arrays, array bounds, binary and hexadecimal numbers.

9 3/4-3/8 Arrays and pass-by-reference Chapter 6 Arrays, array bounds, pass-by-reference.

This is a program demonstrating pointers. Please study this program over Spring Recess.
10 3/11-3/15 Spring Recess
11 3/18-3/22 Pointers Chapter 6 Lab 9
Assignment 9
The game.txt file for Assignment 9


Pointers and memory, 2-dimensional arrays

12 3/25-3/29 Pointers Interlude 4
Memory and Pointers Part 1
Memory and Pointers Part 2
Memory and Pointers in Code
Lab 10
The code to analyze for lab 10

Assignment 10
Board Game Code
A sample exam is here.

Pointers, memory. C style strings, C I/O.

*** Midterm Exam 2 on Friday, Mar 29 ***

13 4/1-4/5 More Pointers Chapter 8 Lab 11
Assignment 11

robotworld.cpp
world.h
robot.h
C++ new and delete operators.


14 4/8-4/12 Linked lists and recursion Chapter 8 Lab 12
Linked lists and recursion.

15 4/15-4/19 Command-line arguments Interlude 6
LinkedList Code from Lecture


int main(int argc, char *argv[]);
16 4/22-4/26 Searching and Sorting Your Instructor

17 4/29-5/3 No Exam Week (Course review) Your instructor *** Final Exam on Monday, May 6, 8:00am-10:00am ***