Skip to content

Commit b8f633b

Browse files
committed
just some minor changes to grammar and to the exercise wording for clarity and match with expected output from the tmc plugin
1 parent 19eccb4 commit b8f633b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

data/part-4/3-files-and-reading-data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ The exercise template comes with two files, `names.txt` and `other-names.txt`. W
533533

534534
<!-- Jos merkkijono löytyy, ohjelman tulee tulostaa "Löytyi!". Jos merkkijonoa ei löydy, ohjelman tulee tulostaa "Ei löytynyt.". Jos tiedoston lukeminen epäonnistuu (lukeminen päätyy virhetilanteeseen), ohjelman tulee tulostaa viesti "Tiedoston lukeminen epäonnistui.". -->
535535

536-
If the string is found, the program should print "Found!". If not, the program should print "Not found.". If reading the file fails (the reading ends in an error) the program should print the message "Failed to read the file.".
536+
If the string is found, the program should print "Found!". If not, the program should print "Not found.". If reading the file fails (the reading ends in an error) the program should print the message "Reading the file " + file + " failed.".
537537

538538
<!-- <sample-output>
539539
@@ -589,7 +589,7 @@ Name of the file:
589589
**nonexistent.txt**
590590
Search for:
591591
**test**
592-
Failed to read the file nonexistent.txt.
592+
Reading the file nonexistent.txt failed.
593593

594594
</sample-output>
595595

@@ -721,7 +721,7 @@ try (Scanner scanner = new Scanner(Paths.get("henkilot.csv"))) {
721721
String line = scanner.nextLine();
722722

723723
// if the line is blank we do nothing
724-
if (line.isBlank() == 0) {
724+
if (line.isBlank()) {
725725
continue;
726726
}
727727

@@ -741,7 +741,7 @@ try (Scanner scanner = new Scanner(Paths.get("henkilot.csv"))) {
741741

742742
<!-- Maailma on täynnä tietoa, joka liittyy muuhun tietoon -- tieto muodostaa kokonaisuuksia. Esimerkiksi henkilön tietoihin kuuluu nimi, syntymäaika, puhelinnumero, osoitetietoihin kuuluu maa, kaupunki, katuosoite, postinumero ja niin edelleen. -->
743743

744-
The world is full of data that are related to other data -- these form collection. For example, personal information includes name, date of birth, phone number. Address information, on the other hand, includes country, city, street address, postal number, and so on.
744+
The world is full of data that are related to other data -- these form collections. For example, personal information can include a name, date of birth and a phone number. Address information, on the other hand, can include a country, city, street address, postal number and so on.
745745

746746
<!-- Tieto tallennetaan usein tiedostoihin määrämuotoisessa muodossa. Eräs tällainen muoto on kurssilla jo tutuksi tullut comma-separated values (CSV)-muoto, eli pilkuilla erotetut tiedot. -->
747747

@@ -983,7 +983,7 @@ amy,1
983983

984984
<!-- Tehtäväpohjassa on valmiina luokka `Henkilo` sekä luokassa `HenkilotTiedostosta` oleva runko metodille `public static ArrayList<Henkilo> lueHenkilot(String tiedosto)`. Toteuta metodi `lueHenkilot` siten, että metodissa luetaan parametrina annetusta tiedostosta henkilöt, jotka lopulta palautetaan metodin palauttamassa listassa. -->
985985

986-
The exercise template already has a `Person` class, and the class `StoringRecords` that has a body for the method `public static ArrayList<Person> readPeople(String file)`. Implement the `readPeople` method such that it reads the persons from the file passed as a parameter, and finally returns them in the list returned by the method.
986+
The exercise template already has a `Person` class, and the class `StoringRecords` has a body for the method `public static ArrayList<Person> readPeople(String file)`. Implement the `readPeople` method such that it reads the persons from the file passed as a parameter, and finally returns them in the list returned by the method.
987987

988988
<!-- Tehtäväpohjassa on valmiina `main`-metodi, jossa voit kokeilla ohjelmasi toimintaa. Muokkaa tehtävässä vain metodia `lueHenkilot`. -->
989989

0 commit comments

Comments
 (0)