Consider a file log.txt. Each line contain a log output from a certain mail application. From: a@gmail.com To: b@gmail.com From: a@gmail.com To: c@gmail.com From: b@gmail.com To: c@gmail.com Now write a program to read from the file and find out how many times each sender has sent the message. Output the number in a output.txt file: а 2 b 1

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Object Oriented Programming

1.
Consider a file log.txt. Each line contain a log output from a certain mail application.
[5]
From: a@gmail.com To: b@gmail.com
From: a@gmail.com To: c@gmail.com
From: b@gmail.com To: c@gmail.com
Now write a program to read from the file and find out how many times each sender
has sent the message. Output the number in a output.txt file:
а 2
b 1
Transcribed Image Text:1. Consider a file log.txt. Each line contain a log output from a certain mail application. [5] From: a@gmail.com To: b@gmail.com From: a@gmail.com To: c@gmail.com From: b@gmail.com To: c@gmail.com Now write a program to read from the file and find out how many times each sender has sent the message. Output the number in a output.txt file: а 2 b 1
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT