Note: For programming exercises, first draw a UML class diagram describing all classes and their inheritance relationships and/or associations.
1.Java Concept Matching.
Match each of the following Socket concepts.
stream
a mechanism for carrying data in one direction
socket
a mechanism for connecting two programs using a client/server model to send data in two directions
The Internet
possibly the largest interconnected set of networks on the planet. However, the dark web plus the Internet would be a larger interconnected set of networks, since it includes both the internet and additional private networks
an internet
any set of two or more networks connected by the same medium, such as a router.
domain name
a name that specifies a specific computer or group of computers
port
a number that specifies the logical location or service on a particular machine
client
a program, such as a browser, that typically makes a request for a service to be performed..
server
a program, such as a web page that waits for request and performs the requested service
ethernet
a low level network protocol
local area network (LAN)
a set of computers connected using a single network protocol within a single property or a single organization
wide area network (WAN)
a network that connects local area networks together using routers and is often geographically dispersed
internetworking protocol
the protocol used in routers that allows computers to have numeric addresses that can be associeted with names.
URL
a uniform resource locator includes a transfer protocol, a domain, and a path to the resource
2.Protocol.
What is a protocol? Give one or two examples of protocols that are used on the Internet.
3.HTTP Protocol Service.
What service is managed by the HTTP protocol?
4.HTTP client applications.
Give examples of client applications that use the HTTP protocol.
5.Applet Limitations.
Why is it important that applets be limited in terms of their network and file system access? Describe the various networking restrictions that apply to Java applets.
6.Internet Protocol.
What does the Internet Protocol do? Describe how it would be used to join an ethernet and a token ring network.
7.ConnectException.
Describe one or two circumstances under which a ConnectException would be thrown.
8.Audio Slide Show.
Modify the SlideShowFrame so that it plays an audio file along with each slide.
9.Cryptogram Helper.
Design and implement a Java applet that downloads a random substitution cryptogram and provides an interface that helps the user try to solve the cryptogram. The interface should enable the user to substitute an arbitrary letter for the letters in the cryptogram. The cryptogram files should be stored in the same directory as the applet itself.
10.Random Joke.
Design and implement a Java application that displays a random message (or a random joke) each time the user clicks a GetMessage button. The messages should be stored in a set of files in the same directory as the applet itself. Each time the button is clicked, the applet should download one of the message files.
11.Client/Server Joke.
Write a client/server application of the message or joke service described in the previous exercise. Your implementation should extend the Server and Client classes.
12.Scramble Service.
Write an implementation of the scramble service. Given a word, the scramble service will return a string containing all possible permutations of the letter combinations in the word. For example, given “man,” the scramble service will return “amn, anm, man, mna, nam, nma.” Use the Server and Client classes in your design. (See the Self-Study Exercises for a description of the design.) Challenge: Modify the Nim server game in this chapter so that the client and server can negotiate the rules of the game, including how many sticks, how many pick ups per turn, and who goes first.