CS 120: Computer Science I

Instructor: Michael Wilder
Email: mdwilder@uidaho.edu
Office Hours: MWR 1:30-2: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 8/19-8/23 Introduction to Computers and Programming Chapters 1 and 2 There are no labs this week.
Assignment 0
Course intro. Programs and executables. Compilers and text editors. Output.

hello.cpp Basic "Hello, World" program using cout.
fortune.cpp Fortune teller program.
2 8/26-8/30 Variables and I/O Chapter 2
Variables 1
Variables 2
Variable Names
If Statements
If Statements in Code
Expressions
Lab 1
Assignment 1

Text editors (nano, vi, etc). Basic unix commands. Variables, basic I/O, conditionals, Boolean logic.
Mathematical expressions and typecasts.
3 9/2-9/6 Loops Chapter 3
Conditionals
Conditionals in Code
While Loops
While Loops in Code
Lab 2
Assignment 2
No class Monday Sep. 2 (Labor Day)

Conditionals: if; loops; Boolean logic.

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

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

5 9/16-9/20 Functions, scope Chapter 4
Function Example 1
Function Example 2
Lab 4
Assignment 4
Functions: arguments, return values, and scope. Switch statements. Structures.

Code for the calculator for lab 4 is here.
6 9/23-9/27 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 5
Assignment 5
Testing, classes, objects, data members, member functions, dot notation.


*** Midterm Exam 1 on Friday, Sep 27 ***
A sample exam is here.

7 9/30-10/4 More Classes Chapter 5
Binary
Hexadecimal
Assignment 6
Lab 6

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

Code for the pet example is here.
8 10/7-10/11 Software design; arrays, binary Interlude 3, Chapter 5
Arrays
Arrays_in_code
Assignment 7
Lab 7

Design: top-down, bottom-up.

Arrays, array bounds, binary and hexadecimal numbers.

9 10/14-10/18 Arrays and pass-by-reference Chapter 6 Assignment 8
Lab 8

Arrays, array bounds, pass-by-reference.

10 10/21-10/25 Pointers Chapter 6 and 7 Lab 9
Assignment 9
Board Game Code
The game.txt file for Assignment 9


Pointers and memory, 2-dimensional arrays

11 10/28-11/1 Pointers Interlude 4
Memory and Pointers Part 1
Memory and Pointers Part 2
Memory and Pointers in Code
Lab 10
Assignment 10

robotworld.cpp
world.h
robot.h
Pointers, memory. C style strings, C I/O.

*** Midterm Exam 2 on Friday, Nov 1 ***
A sample exam is here.

12 11/4-11/8 More Pointers Chapter 8 Lab 11
C++ new and delete operators.


13 11/11-11/15 Linked lists and recursion Chapter 8
Lab 12
Assignment 11

Linked lists and recursion.

14 11/18-11/22 Command-line arguments Interlude 6 int main(int argc, char *argv[]);
15 11/25-11/29 Fall Recess
16 12/2-12/6 No Exam Week

17 12/9-12/13 *** Final Exam on Tuesday, Dec 10, 10:15am-12:15am ***