Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My professor gave me this homework problem, and i came up with the solution below. He said it wasnt fully correct. Can someone please help

My professor gave me this homework problem, and i came up with the solution below. He said it wasnt fully correct. Can someone please help me understand what he wants, and what i need to add. Please give detail. I pasted my code for server and clinet.

image text in transcribed

import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.Socket;

public class Client_Sock {

public static void main(String[] args) { try { Socket sock = new Socket("localhost",9999); PrintStream pr = new PrintStream(sock.getOutputStream()); System.out.print("Enter Something : "); InputStreamReader rd = new InputStreamReader(System.in); BufferedReader ed = new BufferedReader(rd); String temp = ed.readLine(); pr.println(temp); BufferedReader gt = new BufferedReader(new InputStreamReader(sock.getInputStream())); String tm = gt.readLine(); System.out.print(tm); } catch(Exception ex) { } } }

package server_socket;

import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.ServerSocket; import java.net.Socket;

public class Server_Sock {

public static void main(String[] args) { try { ServerSocket ser = new ServerSocket(9999); Socket sock = ser.accept(); BufferedReader ed = new BufferedReader(new InputStreamReader(sock.getInputStream())); String tmp = ed.readLine(); System.out.print("I Recieved :"+tmp); PrintStream pr = new PrintStream(sock.getOutputStream()); String str = "Yup I got it !!"; pr.println(str); } catch(Exception ex){} } }

Play the client+server o Setup one client (android, iOS, web, laptop) and one server IVMs, EC2, local laptop) o Play with the one of the following Web Frameworks: Python (Django, Flask, Pyramid, Tornado, Bottle, Diesel, Pecan Falcon): PHP (Silex, Slim, Lumen, Phalcon): Java (Spring MVC, JSF, Play, Struts); Nodejs (Express, Angular.US, Koa.js, Totaljs, Derby is, Meteor is: MEAN framework. o Create your own Helloworld and write the step-by-step document. Requirement o You can select different solutions for the client and server (client- server independent) o Web/HTTP application (not simple socket programming) o Tutorial style document with step-by-step procedure, and your results o Individual work o Submit your document (word or pdf) and code (as a zip file) to

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions