File Handling
-
Some one help me with the second bit of this question Java can work well with files. It is a matter of importing the relevant files in the java.io class and have the files executed. In executing files, some times exceptions happen. For example, the file in code may not be there on the disk. That makes the code unable to run properly. Therefore the exception has to be either caught or thrown. In this assignment, you are going to read data from a file and then write it in another file. The file given 'marks.txt' should be written with the same data but in another file 'marks.xls'. Since the marks are only coursework and Exam, in the marks.xls, indicate the final mark where final mark = cw*0.40 + ex*0.60. Also indicate if the candidate Excelled (over 70%), passed (50% - 69) and Fail (Less than 50%)
-
Some one help me with the second bit of this question Java can work well with files. It is a matter of importing the relevant files in the java.io class and have the files executed. In executing files, some times exceptions happen. For example, the file in code may not be there on the disk. That makes the code unable to run properly. Therefore the exception has to be either caught or thrown. In this assignment, you are going to read data from a file and then write it in another file. The file given 'marks.txt' should be written with the same data but in another file 'marks.xls'. Since the marks are only coursework and Exam, in the marks.xls, indicate the final mark where final mark = cw*0.40 + ex*0.60. Also indicate if the candidate Excelled (over 70%), passed (50% - 69) and Fail (Less than 50%)
-
If this is question set by your professor, then I strongly suggest you find another course where the teacher actually understands the subject. In the meantime, exactly what help do you need?
just help me with the reading and writing part of the program that will read data from the created text file that contains the names and marks of students and then writes the read data to an excell files while commenting on their marks as stated in the questions
-
just help me with the reading and writing part of the program that will read data from the created text file that contains the names and marks of students and then writes the read data to an excell files while commenting on their marks as stated in the questions
You keep saying "help me" but you fail to say what help you need.
The difficult we do right away... ...the impossible takes slightly longer.
-
Some one help me with the second bit of this question Java can work well with files. It is a matter of importing the relevant files in the java.io class and have the files executed. In executing files, some times exceptions happen. For example, the file in code may not be there on the disk. That makes the code unable to run properly. Therefore the exception has to be either caught or thrown. In this assignment, you are going to read data from a file and then write it in another file. The file given 'marks.txt' should be written with the same data but in another file 'marks.xls'. Since the marks are only coursework and Exam, in the marks.xls, indicate the final mark where final mark = cw*0.40 + ex*0.60. Also indicate if the candidate Excelled (over 70%), passed (50% - 69) and Fail (Less than 50%)
Member 11582451 wrote:
second bit of this question
Which is what exactly? Following is java classes that you would use for reading/writing files. http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html[^] You can google for example on how to read a text file and write a text file.
-
just help me with the reading and writing part of the program that will read data from the created text file that contains the names and marks of students and then writes the read data to an excell files while commenting on their marks as stated in the questions
-
Member 11582451 wrote:
second bit of this question
Which is what exactly? Following is java classes that you would use for reading/writing files. http://docs.oracle.com/javase/7/docs/api/java/io/package-summary.html[^] You can google for example on how to read a text file and write a text file.
i want to read from a text file forexample me.txt and copy the text that is in me.txt and write it to a new excel sheet.
-
You can use the Scanner class[^] to read the input file, and follow the link that jschell gave you for writing.
Thanks Richard MacCutchan, I read through and it was helpful