Fundamentals
of Programming II
CS 215 Fall 2009
The following list of assignments will be updated as the course unfolds. You will need to look here often.
Items will be listed in reverse chronological order.
Programming Assignment 4: Due November 6. See
[prog4.cpp]
and [class-10-30.cpp]
. Your assignment is be turned as a tar file with your name. All of
your code is to be contained in one file called “dynqueue.h”.
=======
Programming Assignment 5: Due November 24 by midnight.
Your assignment is be turned in as a tar file with your name to the
directory “/home/morse/cs215assign5”. Here is the assignment: Give a file (via command line
argument) containing characters from the sets a-z, A-Z, 0-9.
Construct the Huffman Code for each character based on the frequency
count of the characters in the file. The Huffman code for each
character in the file is to be expressed as a sequence of zero's and
one's (binary). The Huffman code for each character is to be put in
a file (via command line argument). Programming Assignment 4: Due November 8. See
[prog4.cpp] and [class-10-30.cpp]
. Your assignment is be turned as a tar file with your name. All of
your code is to be contained in one file called “dynqueue.h”.
>>>>>>> 1.11
The directory to submit your project is “/home/morse/cs215assign4”.
The file prog4.cpp gets you started – and the instructions are in
the comments.
Submit your code for
Assignment 3 at
/home/morse/cs215assign3 on csserver.
Include
only your sort.h
file
and your graphs in pdf.
Programming Assignment 3:
Implement the following sorting
algorithms: Bubble Sort, Insertion Sort, and Shell Sort as generic
functions. The profile is to be
template<typename
T> int
ShellSort(int, T*); and
similarly for Bubble and Shell sorts where the elements in the array
T* are
sorted in place that is T*
is sorted after the call. The integer returned is the number of
statements needed to complete the sort. Turn in your code and a plot
if the number statements needed for various sizes of data – when
the data is sorted, reversed ordered and random. DUE Friday October 9. Update on Programming Assignment 2: You
should have the four files complexx.h,
complexx.cpp, Makefile, and
driver.cpp in
a separate directory for the quiz on Friday. Update on Programming Assignment 2: You
should turn in a tar file
with only the files
complexx.h
and complexx.cpp.
The tar file should be named with your name and assignment number.
Copy the tar file to /home/morse/cs215assign2 on
csserver to
turn in your projects.
Update on Programming Assignment 2:
All operators are to be member functions not helper
functions. To complete the extractor operator – implement the
member functions: void setReal(double); and void
setImag(double);
which sets the real and imaginary
part of the object.
Programming Assignment 2: Complete
Programming Project 28 in Chapter 2 page 109. Due Friday
September 25, 2009. September 7: Assignment 1 update. To
submit your assignment copy your tar file to the directory /home/morse/cs215assign1 September 4: Looking
ahead. Go to Wikipedia and look up the several sorting algorithms
and the C++ code that is listed there (or pseudo code). Start
programming these sorting functions. September 4: Programming
Assignment 1 Due September 9 before class. Write a C++ program that copies
a file exactly. Your executable program should be called mycopy
and it should take two command
line arguments: <input
file name> and
<output file name>.
So invoking your program from the command line will look like this
if we wish to copy the file testdatafile
to
testdatacopy. $ mycopy
testdatafile testdatacopy You
are to capture as many possible errors as possible such as missing
command line arguments and files failing to open. Your
program is only allowed to use the inserter (<<) and extractor
(>>) operators to manipulate the input and output streams.
The program runs correctly if a diff
of
the input and output files gives no output (that is the files are
identical). The
trick is to unset the skipws
flag
in the stream (or to use the I/O manipulator unskipws)
and
read and write the files a character at a time. To unset skipping
whitespace flag for your input stream <input>
do
<input>.unsetf(ios::skipws);
To
use the unskipws
manipulator
do <input>
>> unskipws ...; You
are to turn in your assignment via email to: rfmorse@evansville.edu.
The materials are to be in a tar file and the files to be included
are <yoursource>.cpp and your makefile. The tar file name
should have your name in it and the assignment number. A good
example would be RobertMorseAssignment1.tar. August 26: Edit, compile and execute a C++ program on
csserver (or any linux system). August 26: Read Chapters 1 – 3 in Ford and Topp.