IT 351 CTU Online Debugging in Application Server Question

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.

IT
1
Hollie Gates
IT 351
CTU
February 17, 2020
IT
2
IT
Class Diagram
The class diagram shows the software model development that comprises different layers. The
design of the software consists of the inter-class interface as indicated in figure 1.1.
Figure 1.1: class diagram of a client-server web application
Pseudocode Diagram
Fig 1.2: Sequence diagram of a client-server application: Student/client user
IT
3
Figure 1.3: Teacher User: Sequence diagram of a client-server application
Fig 1.4: Admin user: Sequence diagram of a client-server application
Client-server model
The web application will adopt the client-server model to enable distributed application structure
that would enable partitioning tasks between the clients and the servers (Mathieson, 2009). The
server hosts and runs the entire program or system who are the providers of the platform’s
service or resources. The application clients do not share their resources but request the server’s
services to be provided in their user interface.
IT
4
The web application enhances two-way communication between the client in java and servers.
The application’s design enhances the server’s data to receive feedback or response from the
client, and clients can send or receive data in the platform (Mathieson, 2009). The web
application has features from its design that enable extra streams from both the client and server
using code snippets in the bufferedReader as indicated below.
InputStream obj = s.getInputStream();
BufferedReader br = new BufferedReader (new InputStreamReader(obj);
Another feature of the application includes the read method {read () or readLine ()} of the object
that enhances the reading of data. The data sent by the client/ user in the platform can be shown
as an output by the system and indicated below.
OutputStream obj + s.getOutputStrean();
DataOutputStream dos = new DataOutputStream(obj);
The application can create a server program that enhances the server to receive data from the
user using BufferedReader object and sends a reply in the PrintStream object through the java
compiler. It enables the creation of the client program that connects to the server and sends a
response to the client.
// Server2 class that
// receives data and sends data
import java.io.*;
import java.net.*;
class Server2 {
public static void main(String args[])
throws Exception
{
// Create server Socket
ServerSocket ss = new ServerSocket(888);
// connect it to client socket
Socket s = ss.accept();
System.out.println(“Connection established”);
// to send data to the client
PrintStream ps
= new PrintStream(s.getOutputStream());
// to read data coming from the client
BufferedReader br
= new BufferedReader(
new InputStreamReader(
s.getInputStream()));
IT
5
// to read data from the keyboard
BufferedReader kb
= new BufferedReader(
new InputStreamReader(System.in));
// server executes continuously
while (true) {
String str, str1;
// repeat as long as the client
// does not send a null string
// read from client
while ((str = br.readLine()) != null) {
System.out.println(str);
str1 = kb.readLine();
// send to client
ps.println(str1);
}
// close connection
ps.close();
br.close();
kb.close();
ss.close();
s.close();
// terminate application
System.exit(0);
} // end of while
}
}
Client response program
// Client2 class that
// sends data and receives also
import java.io.*;
import java.net.*;
class Client2 {
public static void main(String args[])
IT
6
throws Exception
{
// Create client socket
Socket s = new Socket(“localhost”, 888);
// to send data to the server
DataOutputStream dos
= new DataOutputStream(
s.getOutputStream());
// to read data coming from the server
BufferedReader br
= new BufferedReader(
new InputStreamReader(
s.getInputStream()));
// to read data from the keyboard
BufferedReader kb
= new BufferedReader(
new InputStreamReader(System.in));
String str, str1;
// repeat as long as exit
// is not typed at client
while (!(str = kb.readLine()).equals(“exit”)) {
// send to the server
dos.writeBytes(str + “\n”);
// receive from the server
str1 = br.readLine();
IT
7
System.out.println(str1);
}
// close connection.
dos.close();
br.close();
kb.close();
s.close();
}
}
References
Mathieson, K (2009). Modeling Web Applications.

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order