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 | Jan 18, 2021 | Grade 12, Grade 12 - text files
Write the following 2 class programs – version one followed by version three. They are different because the layout of the text file has changed. Version one has a single field on a single line (therefore no delimiter required.) Version three has three fields on...
by Editorial | Oct 12, 2020 | Grade 12, Grade 12 - text files
You must be able to read from a text file regardless of its layout or structure eg an “irregular text file” has a variable number of data items per row of data in the text file. From 2022 text files are also likely to contain date/time information. Here is...
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...
by Editorial | Aug 17, 2020 | Grade 11, Grade 11 - Text Files, Grade 12, Grade 12 - PAT, Grade 12 - SQL, Grade 12 - text files
In your three class OOP programs – when working with textfiles, while-loops, creating an array of objects and databases . . . . there is a golden thread of consistency that you must adhere to ie the fields, the field types, number of fields and their order, must...
by Editorial | Jul 12, 2020 | Grade 11, Grade 11 - Text Files, Grade 12, Grade 12 - text files
The more advanced version of the “Six a Side Beach odd even boy girl” program reads in the names of the teams from a text file. Reminder: Where you place the text file differs in NetBeans from jGRASP. Java teacher does have a post on this topic. Click here...