CS216 Laboratories

Fall 2005 Schedule

(Click here to jump to the bottom for most recent lab!)

Date 

Description 

Files and Docs

Aug. 30 Prelab survey: Click here

Laboratory 0 Prelab Document (read and do!):
Intro to C++ [PDF version , Word version]
We start off with a few activities to help you get up to speed quickly with C++.

Note: When using VS .NET 2003 in the stacks using files on your home directory you may get security errors.  Solution: Copy the files locally and things should work fine - just be SURE to remove your files before leaving!!

In-Lab Activities: Here's what you'll do in lab. You may print this and bring a copy or read it from the screen in lab. [Word version, PDF version]

In-Lab Survey (to be completed during lab) Click here.

Post-Lab Activities: Do this after lab and turn in by the deadline! [Word version, PDF version]

Lab 0 Turn-In link: Here. (Click on "Submit Homework" on the right side by Lab00.)
Object life-cycle code for Pre-lab:
lifecycle.cpp

String-vector program files:
svtest.cpp
svutil.cpp
svutil.h

For Post-Lab: Weiss List Code:
dsexceptions.h
LinkedList.h
LinkedList.cpp
TestLinkedList.cpp

Creating Projects in VS .NET 2003

CS201 C++ and VS Help links
Sept. 6 Laboratory 1: Linked Lists [PDF version , Word version]
We develop a doubly linked list class and explore various C++ concepts: pointer manipulation, memory management, iterators. This file contains pre-lab, in-lab, and post-lab instructions. NOTE: Be sure to print the lab check-off sheet and bring it to your lab session.

Lab 1 Turn-In link: Here

Comments and allowed changes for Lab 1! Here
Please make your classes work with this test harness before coming to lab:
ListTest.cpp (updated 9/6/05 11 pm)
Sept. 13 Laboratory 2: Stacks [PDF version , Word version]
For the pre-lab, we implement a simple postfix calculator using stacks. During the inlab activity we will use the STL stack and perform a brief activity on UNIX.

Lab 2 Turn-In link: Here
C++ info on strings, vectors, STL stack

ITC account info


Re-directing I/O
Sept. 20 Laboratory 3: Data Representation [PDF version , Word version]
This lab begins our study of low level data representation. Here we look at representation of different data types and structures at the machine code level.

Prelab: Nothing but reading the lab document and studying the lecture notes. And, read Weiss C++ for Java Programmers Section 11.6, pp. 224-225, on C++ Primitive arrays. (A handout of this will be provided in class and in lab.)
Postlab
: Turn in papers by 4pm Thursday Sept. 22nd to the CS216 mailbox.
Solution to Lab 3 Radix Worksheet

Follow-up Help and Comments!

Wikipedia article on "endianness"

ASCII tables: one with mouse-over, and another in columns
Sept. 27 Exam 1 in Lab  
Oct. 11 Laboratory 4: Trees [PDF version , Word version]
We modify our stack calculator to generate binary expression trees. The in-lab activity involves evaluating the performance of BSTs and AVL trees.

Lab 4 Turn-In link: Here
Code for Inlab:

avltree.h
BinarySearchTree.h
tree_test.cpp
dsexceptions.h

testfile1.txt
testfile2.txt
testfile3.txt
Oct. 18 Laboratory 5: Hashing [PDF version , Word version]
In this lab we implement a word puzzle solver using hash tables.

Here is a link to the files:
[sample grids and output, sample dictionary, timer code]

Lab 5 Turn-In link: Here
Code from Weiss that may be useful (you are not required to use any of this code):
LinkedList.h
QuadraticProbing.h
SeparateChaining.h
mystring.h
vector.h
dsexceptions.h
TestQuadraticProbing.cpp
TestSeparateChaining.cpp
Oct. 25 Laboratory 6: IBCM Programming: [PDF version , Word version]
We become more familiar with programming for IBCM.

To complete this lab, you will need to use the IBCM simulator. Instructions on how to install and use this software are available here. Note: in ITC labs it is already installed -- run it from the menu: Start->S.E.A.S.->IBCM Simulator.

Lab 6 Turn-In link: Here
Executable: vb-ibcm.exe (runs if you have VB)
Install: vb-ibcm-setup.exe (use to install if you don't have VB)

Handouts from class:
a) IBCM Principles of Operation
b) IBCM Programming Examples
Nov. 1 Part 1 of Laboratory 7: x86 Assembly Language Basics.
Writing, Assembling, and Linking assembly language code


We're splitting Lab 7 over two weeks. For this week you'll do:
a) Pre-lab: Do Steps 0, 1 and possibly 2 that are on p. 2 of the the pre-lab document:
[Lab 7 Pre-lab Only]
b) In-lab: Demonstrate Step 2 to the TA (vecsum program) using Visual Studio. Also, there may be another small program for you to do in-lab.
c) Post-lab: Complete the remainder of the Lab 7 pre-lab, i.e. the factorial program in Step 4. Have this done before next week's lab.


Note: You will need the MASM assembler if you are not in one of the labs: ml.exe
Tutorial on how to use assembly language code with C++ code in Visual C++, go [Updated for VS .net 2003] (updates in red)

Vecsum program for prelab: vecsum.asm and main.cpp 


MASM assembler
if you are not in one of the labs: ml.exe
Nov. 8 Part 2 of Laboratory 7: x86 Assembly Language Basics
Pre-lab:
Complete Lab 7 Pre-lab above.
In-lab and Post-Lab: Here are the updated Fall 05 versions:
[Lab 7 In-lab and Post-lab] [Post-lab Cover Sheet]
 
Nov. 15 Exam 2 in Lab  
Nov. 22. Thanksgiving Break!  
Nov. 29 Part 1 of Laboratory 8: Learning UNIX
a) You'll get a printed copy of the in-lab exercises in the lab and the checkoff sheet.
b) The UNIX Tutorials you'll be working on are here
There is nothing to turn in as a post-lab for this activity. Start working on Huffman Encoding (see below) as soon as possible. It's a long program.

Dec. 6 Part 2 of Laboratory 8: Huffman Encoding [PDF version , Word version]
In this lab we implement Huffman Compression and Decompression.  We will have an in-lab activity involving UNIX.

In-Lab Materials:
  -         Makefile tutorial found here
  -         In addition, you need to create a makefile for your Huffman coding and decoding.

 
Lab 8 Turn-In link: Here
Sample input files:

test1.txt
test2.txt
test3.txt
test4.txt
test5.txt