Question 4: You are given a file name _READ.txt (eg., if your roll number is 1505022, then the file name would be 1505022_READ.txt). It consists of several lines of logs taken from a data center server. The logs are shown as follows. CHECKING CONNECTION 1. CHECKING CONNECTION 2. CONNECTION ESTABLISHED SERVER 1. CONNECTION ESTABLISHED CLIENT 1. CLIENT: Hello, my name is Oliver Queen. SERVER: I missed the part where that's my problem. CLIENT: Where am I? SERVER: I missed the part where that's my problem. CLIENT: Okay, I am leaving. SERVER: I missed the part where that's my problem.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
I need the answer within 15 minutes
Question 4:
You are given a file name <ROLLNUMBER>_READ.txt (eg., if your roll number is
1505022, then the file name would be 1505022_READ.txt). It consists of several lines of logs taken
from a data center server. The logs are shown as follows.
CHECKING CONNECTION 1.
CHECKING CONNECTION 2.
CONNECTION ESTABLISHED SERVER 1.
CONNECTION ESTABLISHED CLIENT 1.
CLIENT: Hello, my name is Oliver Queen.
SERVER: I missed the part where that's my problem.
CLIENT: Where am I?
SERVER: I missed the part where that's my problem.
CLIENT: Okay, I am leaving.
SERVER: I missed the part where that's
CLIENT CONNECTION TERMINATED.
problem.
SERVER CONNECTION TERMINATED.
As a debugger, your task is to find out those lines in the above log file, only relevant to the client.
Write a code in Java to read the log file (name: <ROLLNUMBER>_READ.txt), and write only
those lines that are relevant to the client, to another file named <ROLLNUMBER>_WRITE.txt.
(Suppose your roll number is 1505022, then the other file would be 1505022_WRITE.txt).
You can use any IO Streams/Readers/Writers in Java. But make sure your code will be runnable, and
the logic is sound.
Transcribed Image Text:Question 4: You are given a file name <ROLLNUMBER>_READ.txt (eg., if your roll number is 1505022, then the file name would be 1505022_READ.txt). It consists of several lines of logs taken from a data center server. The logs are shown as follows. CHECKING CONNECTION 1. CHECKING CONNECTION 2. CONNECTION ESTABLISHED SERVER 1. CONNECTION ESTABLISHED CLIENT 1. CLIENT: Hello, my name is Oliver Queen. SERVER: I missed the part where that's my problem. CLIENT: Where am I? SERVER: I missed the part where that's my problem. CLIENT: Okay, I am leaving. SERVER: I missed the part where that's CLIENT CONNECTION TERMINATED. problem. SERVER CONNECTION TERMINATED. As a debugger, your task is to find out those lines in the above log file, only relevant to the client. Write a code in Java to read the log file (name: <ROLLNUMBER>_READ.txt), and write only those lines that are relevant to the client, to another file named <ROLLNUMBER>_WRITE.txt. (Suppose your roll number is 1505022, then the other file would be 1505022_WRITE.txt). You can use any IO Streams/Readers/Writers in Java. But make sure your code will be runnable, and the logic is sound.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY