Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

question 3 Course code : Object Oriented Programming I need this question answer with in 1 hour. using java language Question 3 [8] You are

question 3

Course code : Object Oriented Programming

I need this question answer with in 1 hour. using java language

image text in transcribed

Question 3 [8] You are given a file, input.txt, that contains some even number of lines. Each line contains two values: a number and a string. For this task, you need to write a Java code to calculate the sum of the numbers in two consecutive lines of input.txt and write the sum in another file, output.txt. Check the following example for details: input.txt 123 100 50 50 45 55 output.txt Line 1: 223 Line 2: 100 Line 3: 100 Here, the first output is 223 which is equal to 123 + 100. The second output is 100 which is equal to 50 + 50 and so on. The three dots at the end of input.txt means that there are many more lines in the file

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions