Homework Help Global logo
  • Home
  • Coursework Help
  • Dissertation Help
  • Homework Help
  • My account
  • Order now
Order Now
Homework Help

Java advance class ip1 | Computer Science homework help

2 min read
Posted on 
October 29th, 2022
Home Homework Help Java advance class ip1 | Computer Science homework help

Using your design from Phase 1 DB, apply any design changes that you feel are needed and update your UML diagrams. Implement a client/server application in which a client communicates directly with a server. The server stores product and customer information in two separate files. The client application will allow a user to request product and customer information from the server. The server will retrieve and send the requested information to the client. The information will be displayed by the client in a user friendly manner. It is suggested that your application use Swing components to support a user friendly interface.

 

hwew is what I did for my project

 

Client Sever Application

 

 In this client-server application client sends customer and product information to server. Server manipulate information and store on two external files: customerinfo.dat and productinfo.dat. Server grant access to client to read files. Client then read files and show results on user-interface. Detailed steps are shown below:

1.Client.java handles GUI using java swing components. It takes user inputs (product and customer information) as JText fields.

2.When connect Jbutton is pressed, data connection is established and data is sent to server. If connection failed, error is shown on user interface.

3.Server saved customer and product information on customerinfo.dat and productinfo.dat files respectively.

4.Server grants read-only rights for files to client.

5.Client.java read files. When Customer Information button is pressed, JPanel shows customer information after reading data from customerinfo.dat file.

6.When Product Information button is pressed, JPanel shows customer information after reading data from productinfo.dat file.

7.Socket connection is closed.

Server Side Pseudo Code

//Server Creates ServerSocket object for handling client connection requests.

int serverPort = 1234;

ServerSocket ss = new ServerSocket (serverPort);

//In an infinite loop:

//Accept client request

//Handle client requests.

while ( true )

{

Socket s = ss.accept ( );

//Connection with client is now established.

//Communicate with the client

// get parameters

// Write data to each file usingOutputStreamWriter

// Grant to client to access files

}

 

Client Side pseudo code:

//Create a new Socket object.

//Socket object, during its creation, establishes a connection with the server.

int serverPort = 1234;

int serverHost = “localhost”;

Socket s = new Socket (serverHost, serverPort );

//Connection with the server is now established.

//Client can communicate with the server using the Socket object.

//Input Parameters using Swing Components like text boxes

//Receive Response

//Show results on interface

Order an Essay Now & Get These Features For Free:

Turnitin Report

Formatting

Title Page

Citation

Outline

Place an Order
Share
Tweet
Share
Tweet
Calculate the price
Pages (275 words)
$0.00
Homework Help Global
Company
  • Coursework Help
  • Law Homework Help
  • Business Paper Help
  • Thesis Writing Help
Legal
  • Dissertation Help
  • Homework Help
  • Essay Writing
  • Custom Writing
How Our Service is Used:
Homework Help Global essays are NOT intended to be forwarded as finalized work as it is only strictly meant to be used for research and study purposes. Homework Help Global does not endorse or condone any type of plagiarism.
Subscribe
No Spam
© 2023 Homework Help Global. All rights reserved.
Homework Help Global will be listed as ‘Homework Help Global’ on your bank statement.