Programmming Projects
[Homepage] |
[Lab Info] |
[TA's & Tutors] |
[FAQ's] |
[Supplements] |
[Programmming Projects] |
[Sample Program Solutions] |
[Exams]
Pair Programming
All students are expected to work with a partner on the programming projects for this class.
You should also work with a partner (preferably the same one) on the in-lab exercises for
CMPS12L.
To learn a about pair programming please read
All I Really Need to Know about Pair Programming I Learned In Kindergarten.
Please email the name and email address of your partner to the teaching assitant,
Jeff Hagen (jhagen@soe.ucsc.edu) no later than September 30th.
Please make the subject of the email be "partner name".
If we have not received your partner information by that time you will be assigned
a partner.
At the same time that you turn in each programming project you also need to complete
an online log, in the form of a WebCT quiz, that records how you spent your time
on the project.
You should also read the pair progamming guidelines and policy for the class.
This explains what is considered to be acceptable pair programming and what to do if you have problems with your
partner.
Programming Assignments - A Cumulative Project
There are 5 programming projects that each build on the previous
project. The project due dates are every two weeks with the first
project
due on October 6th.
You must successfully complete all previous projects before
you can submit any of the later projects. A project has been
"successfully completed" when you have received 40 points or more of
the 50 points available for the correctness portion of the grade (see
details below). If you submit a program and receive less than 40
points on the correctness portion, then you will have to continue
working on that project and resubmit it the next week. Although due
dates are two weeks apart, project
submissions will be "collected" once per week to accomodate late and
resubmitted projects. You can submit at most one project each week.
A program will be penalized 5 points (from the 100 total) for each
week, beyond the initial due date for that project, required to obtain the 40 point
correctness level. For example, suppose a project is submitted on time at
the initial due date but fails to obtain the 40 points needed for
correctness, if the program is resubmitted within the next week,
and scores 45 on correctness and 50 on
style, it would be penalized 5 points and receive a total of 90 (45 +
50 - 5) towards the overall class grade.
The point of this grading scheme is to encourage students to master one set of
concepts before moving on to the next. This may result in some working at a slower
pace than others.
Of course this slower pace will be reflected in a lower grade, but
the student can still make progress and pass the course. For example,
here is a scenario that would result in an overall programming project
score of 70% (satisfactory but not exceptional).
- Project 1 is completed October 13th, 1 week late, after an unsuccessful ontime
submission and then resubmitted within a week. Before the 5 point penalty, the
program receives a perfect 100 points.
- Project 2 is completed November 3rd, 2 weeks late, (3 weeks after the last
submission of project 1). Before the 10 point penalty, the program again
receives the full 100 points.
- Project 3 is successfully completed November 24th, 3
weeks late (3 weeks after the last submission of project 2), and
receives 100 points before the 15 point penatly.
- There is only 1 week left at this point, and a partial solution to
project 4 is submitted December 1st, the last submission date, which is 2 weeks
late. This program (due to some serious late night programming)
manages to receive 90 points before the 10 point late penalty.
The total for this series of projects is 350 points (70% of the 500
maximum). That is: project 1, 95 (100-5), project 2, 90 (100-10),
project 3, 85 (100-15), project 4 80 (90-10), and project 5, 0.
ChatBot
All programming assignments this quarter are directed toward creating a simple chat-bot.
A chat-bot is a computer program (software robot) that attempts to mimick a real person in
an online chat room. One of the earliest and most famous examples of conversational software robots
is Eliza.
You can see some of the good and the bad in a sample solution to program 5, the full chatbot, in the
following exchange between one human (Charlie) and two chatbots.
This chat room is currently occupied by:
chatbot
ChatBot2
[Charlie ENTERED THE ROOM]
[Charlie]Hello.
[chatbot]Hello.
[ChatBot2]Hello.
[Charlie]How are you?
[chatbot]I am fine.
[ChatBot2]I am fine.
[ChatBot2]Why are you fine?
[chatbot]I like people that are fine.
[Charlie]I like them too.
[ChatBot2]What do people drive you?
[Charlie]They drive me crazy.
[chatbot]Cats run me.
[ChatBot2]What do students eat you?
[ChatBot2]What do men drive dogs?
[chatbot]I like kiwi.
[chatbot]You eat kiwi.
[ChatBot2]People eat a junker.
[ChatBot2]Why do students eat men?
[Charlie]I like programming.
[chatbot]Where do women drive dogs?
[ChatBot2]Do people run women?
[Charlie]Do you like programming?
[chatbot]No. I do not like programming.
[ChatBot2]Yes. I like programming.
[ChatBot2]You want you.
[chatbot]Why do people drive me?
[Charlie]I think that is nonsense.
[chatbot]Why do you say that?
[ChatBot2]Why do you say that?
[ChatBot2]Why not?
[chatbot]Why not?
[ChatBot2]Why do I run a junker?
[chatbot]Dogs eat people.
You will complete the project in 5 steps as detailed below.
- Assignment #1 - Conditional statements -
ChatBot Version 1: Due October 6th at 10pm.
- Assignment #2 - Loops - ChatBot Goes On
And On: Due October 20th at 10pm.
- Assignment #3 - Classes, Objects, &
Methods - Reading a Pattern into ChatBot: Due November 3rd at 10pm.
- Assignment #4 - Arrays - A ChatBot With
Many Patterns: Due November 17th at 10pm.
- Assignment #5 - Bringing ChatBot Online: Due December 1st at 10pm.
Grading of Individual Projects
You must follow the programming style guidelines listed
here.
There are no "late" submissions meaning that programs not submitted
by a weekly due date will not be accepted until the next due date (a
week later).
Because of the resubmit/regrade policy, students are discouraged from
submitting programs that they know will not receive the required 40
correctness points (except of course for the last submission of the
quarter). In such situations, students should instead seek help from
the instructor or TA (not from classmates other than a
pair-programming partner).
Be advised that WebCT can sometimes get rather slow near a deadline,
when many students are trying to submit. If you have a working program
and are just "touching up the style" or doing some final testing, go
ahead and submit it. You can always resubmit up to the deadline
without any penalty, but if it gets too busy and you fail to submit in
the last 5 minutes before a deadline, then you missed the deadline
(like getting stuck in traffic - plan ahead and leave enough time).
Grading Breakdown
Programs will be graded both on corrrectness and style (see the class
style guidelines).
Every program starts out with 100 points. Points are deducted as follows.
- 5 points: Fail to complete the webct log for this assignment.
The deadline for completing the log is 1 hour after the homework deadline.
- up to 50 points: Woefully incomplete implementation. This is intended
to prevent students from getting 50 points for a stylistically correct nearly
vacuous file. It will not apply to any program that made a serious attempt to
implement all required features.
- 100 points: Including code from any source other than the identified (at the top of the file) creator(s)
without proper attribution.
Correctness/Functionality (maximum deduction 50 points): See
individual project descriptions for correctness point details.
Style (maximum deduction 50 points total, 10 points for any one category): Note that some of the following
refer to language constructs you will be learning about during this course. If a style requirement mentions
a language construct that you don't know about (e.g. "break") feel free to ignore it until it comes up in
class. You will be responsible for following all that refer to topics covered prior to the due date of a
particular assignment. If you aren't sure if an item will apply to a particular assignment, it will never
hurt to ask. In general the items are listed in the order you can expect to have them apply.
- 1 point: Each occurance (up to 5 maximum)
of lines that are more than 80 characters long (including spaces). If you connect with ssh most likely the default
width of your terminal window will be 80 characters. Make sure your program looks ok there when displayed with "more".
- 2 points: Each method not preceeded by a meaningful block comment.
- 5 points: Each source file not beginning with an informative block comment including the name(s) of
the creator(s).
- 2 points: Each non-descriptive identifier (class, method, constant, or variable).
- 1-10 points: Inconsistent or inappropriate indentation or the presence of TAB characters in the source file. (Convert
all tabs to white space and check indentation before submitting. You can use the Unix command
expand.) NOTE: This does not mean that you should not use tabs when creating and editing
your source code. It does mean that you should use the
expand command to
replace the tabs with spaces before submitting your final program or use an editor that automatically converts tabs
to spaces.
- 2 points: Each "magic number." A magic number is a literal constant (with the exception 0, +1, and -1) appearing
anywhere in the source of a program except to initialize a symbolic constant (e.g. "static final int size = 5;"
is ok, "for (i = 0; i < 5; i++) ..." is not (because of the 5 not because of the 0). If a numeric literal occurs
only once, then creating a constant is not mandatory but still often helps with documentation.
- 2 points: Each use of a series of if-statements (without else clauses) when an if-else is called for.
- 2 points: Each use of "break" in a loop when the loop predicate could easily be modified to handle the
loop temination without a break.
- 5 points: Using an integer where a boolean is called for. E.g. don't use "while (hasMoreInput == 1)...", use
"while (hasMoreInput) ...".
- 5 points: Each unnecessarily long method (over 50 lines is definitely long, under 25 is almost certainly safe).
- 5 points: Each global variable other than a static final... used to create a symbolic constant.
- 5 points: Each occurance of a repetitive sequence of lines that could/should be easily converted into a method.
[Homepage] |
[Lab Info] |
[TA's & Tutors] |
[FAQ's] |
[Supplements] |
[Programmming Projects] |
[Sample Program Solutions] |
[Exams]
This page maintained by Charlie McDowell
Email regarding this site.