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 | Feb 8, 2022 | Grade 12 - OOP, Grade 12 - text files
Reading in a text file into an array using the Scanner class and using OOP principals eg static variables and methods, creating objects, passing parameters. This program also uses String handling. There are eight versions of this program. The first versions has no OOP...
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 | 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...