by Editorial | Sep 15, 2024 | Grade 11, Grade 11 - Text Files, Grade 12, Grade 12 - text files
A Java program to write to a text file using PrintWriter (not FileWriter). This program reads in a text file using Scanner – a date and a boolean flag. It adds 45 days to the date and compliments the flag (true to false and false to true) It then writes the new...
by Editorial | Sep 9, 2024 | Grade 11 - Text Files, Grade 12 - text files, PWC grade 11 - All
Reading in a text file into an array of objects using the split( ) method in Java. (There are other ways of doing this for example using useDelimiter( ) with next( ) ) Here is the text file using “#” as the delimiter. Note that there are no extra spaces or...
by Editorial | Sep 2, 2021 | Grade 11, Grade 11 - GUI, Grade 11 - Text Files, Grade 12 - PAT
The weather station project – Grade 11 This Java project is similar to the grade 10 project but a much higher level of sophistication is required – in how the four text files are read in for example. The grade 11 version uses 4 arrays which the grade 10...
by Editorial | May 17, 2021 | Grade 11, Grade 11 - Text Files, Grade 12, Grade 12 - text files
Grade 11 – Reading in a text file into an array or into parallel arrays (array sets). Without a delimiter and with a delimiter. Grade 12 – Reading in a text file into an array of objects GRADE 11 1) Reading in a simple text file using the Scanner class....
by Editorial | May 12, 2021 | Grade 11, Grade 11 - Text Files, Grade 12, Grade 12 - text files
Being able to read in a text file into an array of objects using the Scanner class is mission-critical in the final grade 12 practical exam paper. Here are some examples for you to practice with. 1) This text file has 5 fields ie Order, Restaurant, Description,...
by Editorial | Oct 6, 2020 | Grade 11, Grade 11 - Text Files, Grade 12, Grade 12 - text files
Writing to a text file using FileWriter (not PrintWriter) In this example books are added to a growing list of books that is stored in a text file. Therefore we are appending new book records to the bottom on the file thereby creating a flat file database (text based...