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

DEPARTMENT OF INFROMATION TECHNOLOGY / SOFTWARE

ENGINEERING

BITH261- Network Programming

INSTRUCTION TO CANDIDATES

This paper carries three(3) questions. Answer ALL.


Question 1

a. Write code for a multi-threaded server that would echo system time to a telnet client
on port 23. [10]

Question 2

a. Create a serializable Class called BankAccount with the following fields account
name, account number, account type and balance. You should provide getters and
setters for the variables you define
[10]
b. Write a Java class method called saveToFile ( ) that persists the calling object to a file
called bankaccounts.dat [10]

Question 4

ROT13 Algorithm
ROT13 (rotate by 13 places) replaces a letter with the letter 13 letters after it in the
alphabet.

For example :

The quick brown fox jumps over 13 lazy dogs.

Becomes

Gur dhvpx oebja sbk whzcf bire 13 ynml qbtf.

a. Write source code for a client and server application. The client is supposed to send text
message input from the user and then encrypts it using the ROT13 algorithm. The server
is supposed to be listening to client messages on port 2018. When the client connects to
the server, the server prints the encrypted and decrypted message using the ROT13
Algorithm and prompts user for a response message. The response is ROT13 encrypted
before sending it back to the client. Your client is able to decrypt the message from the
server and display both the encrypted and decrypted messages. The server and client
processes terminate when either of them sends a message “bye” or “olr” its ROT13
equivalent. [20]

-------------End of Paper ------------------

You might also like