Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

CIS 375 Final Examination

Summer 1999

Name: _______________________________
ID#: _________________________________

Part I. True or False. (40 points 2 each)


1.

True or False: Each Java stream class performs multiple functions.

2.

True of False: Swing employs a peer-based architecture to generate and display GUI components.

3.

True or False: UDP is a connectionless protocol while TCP/IP is connection-oriented.

4.

True or False: AWT components may be added to the layout manager of the outermost container.

5.

True or False: It is possible to attach a stream to certain objects in memory.

6.

True or False: Object serialization may be used to preserve the current state of an object.

7.

True or False: Java stream objects are typically chained together to perform multiple transformations.

8.

True or False: A Java socket may be a source/sink for a stream object.

9.

True or False: The default layout manager for an application is ContentPane.

10. True or False: The AWT makes use of the view-model-controller architecture.
11. True or False: Swing allows applets embedded in a web page to have pull-down menus.
12. True or False: HTTP and SMTP are standard text-based protocols.
13. True or False: Layout managers are responsible for positioning graphical components on the screen.
14. True or False: A monitor is used to prevent data corruption.
15. True or False: A monitor is activated by using the keyword synchronized.
16. True or False: The close() method of a socket has the side effect of flushing the stream buffer.
17. True or False: A mutator method is used to change the value of a data field.
18. True or False: Serializable is an interface but requires no methods to be defined.
19. True or False: Java allows the programmer to overload operators.
20. True or False: An overloading method must accept either a different number or type of argument(s)
than the method it overloads.
Part II. Fill in the blank. (40 points 4 each)
21. Successful JDK1.1/Platform 2 event handling requires: 1) that a listener must implement the
appropriate _________________ , 2) that the listener must define the required _________________ ,
and 3) that the listener must _________________ itself with the source.
22. The ItemListener interface requires implementation of the _______________________
method which takes ___________________as an argument.

23. AWT/Swing event sources detect _________________ events and respond by firing
________________ events.
24. JFC stands for ________________________________ of which the GUI component portion has
become know as _________________.
25. A ServerSocket is used to ________ to a port.
26. The accept() method of the Socket class ___________________ until a new connection is established.
27. A client doesnt need a ServerSocket because its return information is carried in the ______________.
28. In the socket examples given in class, rather than HTTP or FTP, our protocol was ________________.
29. In the multi-threaded server example, we maintained the current count by using the AliveCounter
whose accessor and mutator methods were ____________________.
30. In order to write an object to a stream, that object must be defined as ____________________.
Part III. Short Answer. (20 points 4 each) (Write no more than one or two sentences for each.)
31. The getImage() method is asynchronous What does that mean?

32. If an appropriate listener is registered with a Choice, how may one determine which entry was
selected?

33. What is the difference between over-riding and overloading a method?

34. Why are swing components more flexible than AWT components?

35. There are three different ways to divide-up the stream classes What are they?

You might also like