Info2 SS2014

Website of Prof. Dr. Barne Kleinen, Professor for Media Informatics (Bachelor/Master) at HTW Berlin

Info2: Exercise 03: Chatterbox

     <prev next>

Pre-Lab

Please research the following questions before coming to the lab. Write down your answers and bring them with you for pre-lab check-in. There are many sites that will show you the code for this.

  1. How do you set up a connection between two computers in Java?
  2. Write a method to read from a connection in Java.
  3. Write a method to write to a connection in Java.

Assignment

These are the required exercises for this week. Work in groups of two, each of you hands in the same report. Remember to put both your names on the report. You can continue to use BlueJ, or move to Eclipse, if you wish. We will be practicing much programming in the small this semester.

  1. Start your chatterbox by writing a method that listens on a port. This is your chatterbox server.
  2. Now write a client that writes to a port.
  3. Test your methods on your own machine. For now, just echo what you have read to the console to see it working. Now publish your computer name and port number on the board in the lab.
  4. Start chatting with a few of your neighbors! Describe what works and does not work

For the bored:

  1. Remember that support desk application we had? Well, can you set it up so that your server listens for someone to type something, feeds it into the support desk, gets the support desk answer back and returns that to the person asking?
  2. Read up on Eliza and see if you can make a chatterbox “shrink” (psychiatrist).

Lab Report / What to turn in

Your report is due by 10.00 am on Monday after the lab (for Groups 1&2.)

As in Informatics 1, I am more interested in process than in product, although we are now getting more interested in products as well. Your report should include any collaborators on top of the first page, summarize what you learned, and note the time you invested in this exercise. Both of you need to upload the same report in PDF format to Moodle before the deadline.

Special Questions for your report

How many lines of code did you write for each class? Record this statistic in your report.