CS 476/576- Systems Programming
Fall 1999
Final Exam
Time 2 & 1/2   hours
Open Book & Notes



 

Question 1: (40 points)

Consider the program buttonsq.java that creates 12 buttons.

A)  Modify the program such that:
Solution A:  buttonsq1.java

B)  Modify the program  such that the 12  buttons are arranged as follows:
1. Button 1 is placed at the top
2. Button 2 is placed at the left
3. Button 3 is placed at the right
4. Button 0 is placed at the center
5. Buttons  4-11 are arranged into two rows  and
    four columns and are  placed at the button.
Solution B:   buttonsq2.java


Question 2: (60 points)

Consider the following Java Programs:

Rewrite both of these two programs in C using  select
(i.e., do NOT use fork  or threads).
Solution:  TwoChatServer.c
Solution:   ChatClient.c