|
|
HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Info 2: Informatik II
Winter Term 2010/11
|
Finger Exercises
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.
- How do you set up a connection between two computers in Java?
- Write a method to read from a connection in Java.
- Write a method to write to a connection in Java.
Lab exercises:
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.
- Start your chatterbox by writing a method that listens on a port. This is your chatterbox server.
- Now write a client that writes to a port.
- 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.
- Start chatting with a few of your neighbors! Describe what works and does not work
For the bored:
- 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?
- Read up on Eliza and see if you can make a chatterbox "shrink" (psychiatrist).
Your report is due by 11.00 pm the night before your next lab! 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, summarize what you learned, and note the time you invested in this exercise. How many lines of code did you write? Record this in your report.
Copyright 2010
Prof. Dr. Debora Weber-Wulff
Questions or comments:
<weberwu@htw-berlin.de>
Some rights reserved. - Copyright and Warranty