0% found this document useful (0 votes)
128 views

CS330 Assignment2-Solution

Develop a client-server network application using socket programming. The server will handle multiple client requests simultaneously without blocking other clients. It will listen on a port for client requests. The client will communicate with the server through a socket to query product information like price and date, entering the query at runtime. The project must be submitted through the university's blackboard system with source code files and pasted in this document. There is an optional bonus for including a GUI or database.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views

CS330 Assignment2-Solution

Develop a client-server network application using socket programming. The server will handle multiple client requests simultaneously without blocking other clients. It will listen on a port for client requests. The client will communicate with the server through a socket to query product information like price and date, entering the query at runtime. The project must be submitted through the university's blackboard system with source code files and pasted in this document. There is an optional bonus for including a GUI or database.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Al Imam Mohammad Ibn Saud Islamic University

College of Computer and Information Sciences

CS 330: Computer Networks

Summer Semester 2022\2021

Assignment 2 (5%)

Deadline: 31-Jul-2022
Student Student ID Student Name
No
1 440013353 Saleh Abdullah Alyaqub
2 440017803 Mohammed Fheed Alhassan

Assignment (Project Description):

Develop a client-server network application using the socket programming


technique you learned in the course. Your program should allow the client to connect
with the server (through TCP) and sends queries about some products (cars,
smartphones, … etc). The server accepts the client's request and sends back
information (price, production date, ..etc) about the required product.

Your program should provide the following:

1) The server part of the program with the following features:

a. The server can handle many clients requests simultaneously.


b. If certain client is blocked, this will not affect other clients.
c. The server should be always running (listening to the application through a
certain port) and waiting to accept clients' requests.

2) The client part of the program with the following features:

a. The client communicates with the sever through a certain socket.


b. The client's socket should be closed after addressing his request by the
server.

Imam University | CCIS | Doc. No. 006-01-20141026 Page 1 of 7


c. The product's query should be entered by the user during the run time (via
the Scanner object).

Notes:

Use the Java programming language and conventional IDE like NetBeans or Eclipse
to develop your application.

The project should be submitted through the blackboard. Submit the source code files
(.java files) in a compressed file via the blackboard system.

In addition, copy and paste the codes (for the server, the client, and the other classes
at the end of this word file).

There will be two points as bonus (optional) for including a graphical user interface
and database in your application.

The assignment could be individual or include at maximum two students. Write your
names at the beginning of this word file.

The assignment must be submitted by each student in the course through the
blackboard (if there is more than one student in the group, each one should submit the
project through his blackboard account).

Start inserting the codes (classes) here:

Imam University | CCIS | Doc. No. 006-01-20141026 Page 2 of 7


ClassServer

Listener.java:

dbconnection.java:

Imam University | CCIS | Doc. No. 006-01-20141026 Page 3 of 7


QueryManager.java:

Class Client:

Imam University | CCIS | Doc. No. 006-01-20141026 Page 4 of 7


Client.java:

Utils:

AES.java:

Imam University | CCIS | Doc. No. 006-01-20141026 Page 5 of 7


Output Interface:

Imam University | CCIS | Doc. No. 006-01-20141026 Page 6 of 7


Imam University | CCIS | Doc. No. 006-01-20141026 Page 7 of 7

You might also like