Assignments will maintained on this page. Consult it for details, speifications, expectations, hints and updates. At times the deadlines may not be achievable due to unexpected diffulties in the assignment or in your academic or personal lives. In such instances please request an extension via e-mail.
There will be three submission modes: via e-mail, via hard copy and by the homework submission program, hsp. Please regard the particular mode requested on each assignment. For details on hsp, see Homework Submission Program
a) By class time on Wed., please send me e-mail from the address to which you prefer mail regarding this course be sent. Include the following information:
Reading: read Ch. 1 in Kruse.
See the program rat0.cpp handed out in class.
a) List operations that you would want to have in a rational number class.
Due: Wed., format: handwritten.
b) Perform some of the updates as indicated there.
due date: classtime on Fri.
deliverables: program listing and sample rum.
See program rat5.cpp handed out in class and available
on Accounts/courses/cs127/rnau
Modify it or your own rat program to
See the program stack1.cpp handed out in class and available on
Accounts/courses/cs127/rnau
Modify it,or your own stack program, so that
See the program stack31.cpp handed out in class and available on
Accounts/courses/cs127/rnau
Modify so that
Refer to the linked list implementation of a queue started in class
You should try to complete and test
Refer to your linked list implementation of a stack and the program SQ.cpp
in which a stack was derived from a queue. You are to write and test a
program QS.cpp in which you derive a queue from a stack. For the sake of
simplicity - do not use templates, and have your two classes and main() all
in the same file.
Due: classtime Monday 4/16
Deliverable: hsp QS.cpp
See the SnowFlake.cpp program on the account and discussed in class.
Get rid of my main() and replace it by one that uses turtle graphics
to draw squares, then pentagons, etc. Aim for generality. You might
want to make a turtle class and file turtle.h.
Due: Let's see how far you get by classtime Wednesday 4/18
Deliverable: hsp - include "turtle" in the title
See the program Pstrings0.cpp on the account and being discussed
in class. In the comments are several suggestions for additional
functions to add to the class, viz. length(), AllCaps(), Adds and
Deletes and concatenation. Add and test some of these.
Due: As far as you can get by Monday 4/23
Deliverable: hsp - call it pstring.cpp please.
See the program pizza.cpp on the account and used in the lab.
In the comments are several suggestions for additional
functionality to add to the program, viz. more and better colors,
a new shape, better olives, red peppersl. pepperoni, etc.(),
Add and test some of these.
Due: As far as you can get by Monday 4/23 also. You probably
needn't spend much more time on it then you did in the lab.
Deliverable: hsp call it pizza.cpp
See the program qsort.cpp on the account and discussed in class. Modify it so that rather than using recursion it uses a stack. Use a templated stack class. What to stack is the question. There are at least two possibilities. You can stack indices either in pairs (use a little Pair struct) or individual indices just so long as you Pop them in the reverse order. The indices represent the endpoints of the subarray to be sorted.
Hints:
Deadline: Wed, 5/9, 8:30 am
Format: hardwritten is fine
Consider the airport7.cpp program demonstrated in class, which stores the airport codes in a tree. You will find a version of it on our class account. It does a number of things, but one thing it doesn't do is search. That's your job. In particular,
Deliverables: Your copy of the program via hsp.
Deadline: classtime, Wed 5/16
Consider the zoo program demonstrated in class. You will find a version of it, named zoo.cpp, on our class account. However that version does not store the tree to a file and retrieve it. That's your job! You are to complete the outTree and inTree functions.
Some suggestions:
Deliverables: Your copy of zoo.cpp via hsp.
Deadline: Fri 5/18
Proposal
Deadline: Thurs 5/17
A brief proposal on your intended final project. The final project must include data structures, preferably something using linked structures. The default project is to graphically demonstrate data structures. But even in that case a more specific proposal is required.
Format: by e-mail
Outline
Deadline: Mon 5/21
This could be in pseudo-code (preferred) or English or C++. It should be an outline of what your program does.
Format: hsp, call it poject0 in a folder called Project. In fact, all your hsp for the project should be there.
First draft of the program
Deadline: 11:59 pm, the last day of classes.
This should be a working program. It need not be complete. It can contain stubs.
Format: hsp, project1.cpp
Final version
Absolute deadline: 5:00 pm, last day of exams
Formats: Both a hardcopy included in your portfolio and copies of all relevant files suitably named, e.g. project2.cpp, via hsp.