|
|

This is only a preview of the paper Click here to register and get the full text. Existing members click here to login
|
|
|
FdSc IT & Computer Networking
Programming for the Internet Assignment
CONTENTS
Introduction 3
OOP – object orientated programming 3
Anology of an object 3
Client/server applications 4
The requirements of a client 4
The classes and methods needed to implement these requirements 5
Classes 5
Methods 6
Description of classes and methods used 6
Programme listing 8
(server) 8
(client) 10
Conclusion 13
Recommendations 13
Glossary of Terms 14
Bibliography 16
Reference 17
Introduction
OOP – object orientated programming
In OOP the program is made up of lots of self contained parts called objects, each of which has its own specific part to play in the program. ... In a program there could be a car class that describes the features of all cars (colour, make, model etc). ...
In Java programming, a set of classes are designed and constructed. When the program is run, instances of those classes are created and discarded as needed.
Client/server applications
A client is a requester of services and a server is the provider of services.
A typical client/server interaction works like this:
1. ... The client connects to the server. ... The client sends the query to the server. ... The server analyses the query. ... The server computes the results of the query. ... The server sends the results to the client. ...
The requirements of a client
The Client needs a way to communicate with the Server. ...
What we want our client to do in this assignment is to connect to a port and then print out whatever the server says, in this case the current time (using the daytime service port 1[13]). It will do this by making a socket connection to the server.
The classes and methods needed to implement these requirements
Classes
DTClient
DTHandler
By using certain java packages, particular classes and methods will be invoked by the means of inheritance.
Packages used in this assignment are:
Java.lang – this provides the classes that are fundamental to the design of the java programming language.
Java.net – this provides the classes for implementing networking applications
Java. ...
Java. ...
Methods
main
getline
Description of classes and methods used
The DTClient class uses the main() method to enable the communication between the user and the program and the initialization of the arguments/parameters required.
Approximate Word count = 1869 Approximate Pages = 7.5 (250 words per page double spaced)
|
|
|

|
|
|