CS 113 Programming Assignments
General Assignment Information
Program Requirements
Source File organization
Some general coding information
Specific Assignment Information
Program 2: Statistical Analysis
mnms.dat
Program 4: Sorting/Manipulating using structs
state.dat
(single line records)
statesLine.dat
(multi-line records)
Sample Programs
Random Walk
Random Walk
simulation written in Java. This is what your walker does.
See the examples in the
Random Number
section below.
Objects/Classes
circle.cpp
--- An example that uses a class to define a circle.
Debugging Class files
debug.h
--- The interface file.
debug.cpp
--- The implementation file.
testdb1.cpp
--- Static debug object test file.
testdb2.cpp
--- Dynamic debug object test file.
CD Database
cddb.cpp
CD database program--- partially implemented.
CDDB.dat
Sample data base file
cddb_CC.notes
Notes on changes for CC.
strSort.cpp
Example program for sorting strings.
Random Numbers
Example program
Illustrates random numbers, functions, and writing to multiple files.
Distribution (0-5)
Distribution (5.0-10.0)
Estimate PI program
A program that calculates Pi using random numbers and several functions. See the link below for a graphical representation of the problem.
Estimate Pi using random numbers
A simulation written in Java. Compare this solution with the C++ program above.
Dice/Craps
Craps source file
dice.h
--- Interface for dice class.
dice.cpp
--- Implementation for dice class.
testDice.cpp
--- Test program for dice class.
Sorting
mergeSort.cpp
selSort.cpp
quickSort.cpp
Home