CS151: Principles of CS I

Resources

Some (sample-)exams from previous years

Please keep in mind that some of the material on these exams may not be appropriate for our upcoming exam. Still, if you search through them you will find some nice array questions etc.

Software

Classroom resources

Exam Schedule

Exam Number Date Material
1 10/3/2008 Up to and including Chapter 6
2 11/7/2008 Chapter 7 through (including) Chapter 11
Final Exam Thursday 12/11/2008
from 3 to 5:30pm
Comprehensive (up to chapter 15)

Homeworks

Homework number Due date Material to read Problems
1 9/3 (Wednesday!) Through end of chapter 2 2.1,2.2,2.9,2.12,2.13,2.14,2.15,2.16,2.17
2 9/8 Chapter 3 3.1, 3.2, 3.3, 3.4, 3.6, 3.11, 3.13, 3.17, 3.22
9/15 Chapter 4 No homework (project 1 due!)
3 9/22 Chapter 5 up to and including 5.4 5.1-3, 5.5, 5.10-12
9/29 Rest of chapter 5, 6.1 through 6.3 No homework (project 2 due!)
10/13 Rest of chapter 6, all of chapter 7 No homework (project 3 due Friday!)
10/20 Chapter 8 No homework (project 4 due Friday!)
4 11/24 Chapter 12 and 13 Development exercise 13.8

Projects

Project number Type Point value Due date Description
1 Individual 10 9/15 Exercise 4.12 (including the "redo Exercise 12 on page 138" part!)
2 Individual 10 10/1 Development exercise 6.31 page 362. Please read the instructions carefully.
3 Individual 25 10/17 Project3.pdf
4 Individual 20 10/24 Development exercise 8.9 (use exceptions!)
5 Pair (group of two) 30 11/14 BlackJack.pdf
Extra credit Individual 20 start of final exam GUI calculator as described in class

Labs

Lab number Week of Lab
1 9/1 Lab1.pdf
2 9/8 Problem 3.24 page 142-143
3 9/15 Problem 4.14 page 211
4 9/22 Problem 5.16
5 9/29 Problem 6.11
6 10/20 Problems 8.6 and 8.7
7 10/27 Problems 9.12, 13, 17, 18
Create a StringUtils class and put a utility method in this class for each of these problems. For example, for problem 12 create a public static String reverse(String) method. For each problem also create a class with just a main method that uses the utility methods you create in StringUtils.
8 11/3 Problem 10.18
9 11/10 Problem 11.7
Notes:
  • Use all of the sorts mentioned (even heapsort) and, in addition, use bucketsort.java (link will be available soon!)
  • Instead of measuring a single array size, measure 5000, 10000, and 20000 for each sort routine.
  • The array size of 5000 might be too small to get reproducible times for heapsort.
  • For each array size run your timing program 5 times and report each time and their average.
  • Use Excel (or any graphing tool you like) to produce a performance graph for each sort (x axis should be input array size, y axis should be average time to sort in seconds). Put all sort algorithms on a single graph so we can compare them (choose a logarithmic scale for the y-axis).
10 11/17 Problem 12.18
11 11/24 Problem 13.7
12 12/1 Problem 14.10

Project types (see syllabus for detailed descriptions)

Individual project: Absolutely no cooperation with classmates, no assistance from tutors or any outside sources.

Open project: You may cooperate as much as you like with classmates and seek some outside assistance if you need it (such as from a tutor).

Group project: You may with within your group no cooperation is permitted between groups or with outside resources.


Page maintained by:

David Shaffer
cdshaffer@acm.org
Shaffer consulting
Last modified: Mon Sep 19 08:59:47 EDT 2005