Ask the user to enter an input file name

Assignment Help Computer Engineering
Reference no: EM132201147

Question :

Write a java program that would ask the user to enter an input file name, and an output file name.

Then the program reads the content of the input file, and then writes the content of the input file to the output file with each line proceeded with a line number followed by a colon.

The line numbering should start at 1.

Should be used the following technique

(a) while loop should be used to complete the program.

(b) Scanner classisused

(c) PrintWriter class is used

(d) The files are closed before the program terminates.

Example

Original Input file Output file with line number added
234 1: 234
546 2: 546
238 3: 238
765 4: 765

Reference no: EM132201147

Questions Cloud

Write a javascript script that inputs several lines of text : At the end of the JavaScript file, finish with this line to fire the load event when a resource and its dependent resources have finished loading.
How much would john be prepared to pay for full insurance : In another scenario, he has a utility function over wealth; U = W1/14. He is looking for insurance to cover his loss if robbery occurs.
Display the mouse point location with proper labels : Write an JavaFx program, MousePoint, that displays the mouse point location with proper labels when the mouse is pressed in the pane.
Make a diabetes prevention program tailored : A local clinic is trying to make a diabetes prevention program tailored to their patient population. Two major factors to preventing and controlling diabetes
Ask the user to enter an input file name : Write a java program that would ask the user to enter an input file name, and an output file name.
What is the value of test statistic : You decide to test your claim using publicly available registration records and a 0.05 significance level. What is the value of your test statistic?
Determine the capitalized costs of each separation systems : You have been asked to make a recommendation whether a slurry that needs to be separated should be separated with a centrifuge system or with a rotary vacuum.
Find the standardized test statistic? z : At alpha a equals =0.06?, is there enough evidence to support the? administrator's claim? Find the standardized test statistic? z, and its corresponding area.
Define real exchange rate as the relative price of houses : Suppose that houses are made of aluminum and bricks. Assume that in each country the price of a house is equal to its cost of production.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a function that input a frequency a maximum amplitude

Write a function that inputs a frequency, a maximum amplitude, and length in seconds. Create two sounds, one a square and one a triangle, using the same inputs.

  Why a large company should invest in an identity governance

Write a 3 to 5 paragraph briefing paper that identifies and explains the three most important reasons.

  Write a c program that when you type in five numbers

Write a C program that when you type in five numbers, it will print the number from the smallest one to the largest one.

  Calculate the squares and cubes of all integers from 1 to 10

Write a Java program to calculate the squares and cubes of all integers from 1 to 10. Align the printout as in the sample output.

  What is meant by active termination

What is the reflection coefficient for a bus with a characteristic impedance of 75 U and a termination of 200 fl?

  Prove the following property of boolean algebra

prove the following property of Boolean algebra . give a reason for each step !!

  What are the two models of interprocess communication

What are the two models of interprocess communication? What are the strengths and weaknesses of the two approaches?

  Search on the various office suites available in the market

Johanna is doing an online course in IT. She wants to submit her assignments to her instructor, who reviews them and provides feedback in the document. Johanna also wants to include charts, graphs, and diagrams in her assignments.

  Explain how could exploit the format string vulnerability

Explain how you could exploit the format string vulnerability in the program so that you can cause the program to display

  Discuss how you think it applies to homeland security

After reading the above Robert Frost poem please respond as to how you think it applies to Homeland Security. Do fences make good neighbors

  Write down a function called numweeks

Write down a function called numWeeks that takes an integer parameter representing a number of days and returns an integer that is the number of whole weeks in that number of days.

  Investigate applications-laplacian pyramid blending

In this project, you will investigate two applications: Laplacian pyramid blending and hybrid images. You can use the former to make smooth transitions between arbitrary images, such as the fish sandwich depicted in Figure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd