1. Engineering
  2. Computer Science
  3. q1 in this question the aim is to create a...

Question: q1 in this question the aim is to create a...

Question details

Q1. In this question, the aim is to create a Java program that will copy the contents of a text file to another after changing the format. Start by creating a file source.txt that includes text similar to the diagram below. Then, write a method copy (String source, String dest) that reads the source file and saves its content into a destination file that uses the CSV format (Comma Separated Value) - see below. Your method must show an error message if the source is not found, and it must show a warning if the destination already exists and will be overwritten. Test your code by calling the method with this line: copy (source.txt, destination.csv); destination.csv Kent,Clark,24,123456 Danvers,Kara,23,45678 Parker,Peter,27,98732 source.txt Last Name: Kent First Name: Clark Age: 25 ID: 123456 Last Name: Danvers First Name: Kara Age: 23 ID: 45678 Last Name: Parker First Name: Peter Age: 27 ID: 98732

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution