Homework 1: Conversation
Due: Wednesday, Feb. 3, 11:59pm
Outline
The purpose of this assignment is to review the programming techniques you learned in CSC 111 (or its equivalent), while beginning your introduction to Java. This assignment should not require any new programming concepts, but the Java syntax and compiler will be new.
For the main part of the assignment, you will write in Java a program similar to those you might have written in CSC 111. (In fact, this project is based on an assignment given in that course by Judy Franklin.) Your program will carry on a simple conversation with the user.
What to submit (rsubmit hw1 ...):
Program: Conversation
The program you will write is a simple chatbot, a form originally popularized by the program called Eliza (very interesting history!)
It will ask the user to choose a number of rounds of conversation in advance. Then it will take turns printing messages to the user and accepting responses until the specified number of rounds are complete. Finally it will print a transcript of the entire conversation.
If at any point the user's input contains words that can be mirrored ("I" <-> "you" for example) then the computer's next response will be a mirrored version of the previous statement. Otherwise it will select from a set of canned phrases. Below is one sample conversation, with the user's input in red.
$ java Conversation How many rounds? 2 Hi there! What's on your mind? I'm thinking about clouds. You're thinking about clouds? Yes, but nothing very profound. Mmm-hm. See ya! TRANSCRIPT: Hi there! What's on your mind? I'm thinking about clouds. You're thinking about clouds? Yes, but nothing very profound. Mmm-hm. See ya!Follow this link for a more detailed description of what your program should do.
Hints and Extensions
Reflections
For this assignment, the reflection should describe the differences between Java and any previous programming experience (such as Python) you noticed while completing the assignment. What are your initial impressions of Java? Can you draw any conclusion about programming in general from the similarities or the differences between languages? You may also use the reflection as a means of expressing to me parts of the assignment that you found difficult, did not complete, etc. Do not fear that your grade will be lowered because you tell me that something is unclear to you; in grading, I will rely only on the evidence of the programs and typescript you submit. The reflection serves simultaneously as a means of self-improvement for the student, a form of feedback for the professor, and a way for the class to share ideas as a group.
I will post more about the self-reflections later on.
Assessment
Your grade on this homework is based on several factors. Most important is completeness. A program is considered complete if it compiles and executes more or less as described, is documented with a readable typescript, and includes adequate reflection. Programs turned in without a typescript or readme will not receive full credit. You have to submit all the files before the deadline. (An automated utility will collect the submissions at the deadline. Late submissions will therefore not be collected or graded.) Adherence to the style and documentation standards is another factor. Please follow the Javadoc style rules as described in class. Finally, I will evaluate your code for coherence, organization, and clarity.