Skip to content

Typos and Grammar Corrections #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 5, 2020
2 changes: 1 addition & 1 deletion data/part-1/1-starting-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Getting started with programming"
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tutustut kurssilla käytettyyn NetBeans with TMC -ohjelmointiympäristöön. -->

Expand Down
2 changes: 1 addition & 1 deletion data/part-1/3-reading-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Reading input'
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>


<!-- - Opit kirjoittamaan ohjelman, joka lukee käyttäjän kirjoittamaa tekstiä. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-1/4-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Variables"
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tunnet käsitteen muuttuja. Tiedät mitä ovat muuttujan tyyppi, muuttujan nimi, ja muuttujan arvo.
- Osaat luoda ja käsitellä merkkijono-, kokonaisluku-, liukuluku-, ja totuusarvomuuttujia. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-1/5-calculating.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: "Calculating with numbers"
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Osaat tehdä laskutoimintoja muuttujien avulla. -->

Expand Down
2 changes: 1 addition & 1 deletion data/part-1/6-conditional-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Conditional statements and conditional operation"
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tunnet käsitteen ehtolause ja osaat luoda ohjelmaan vaihtoehtoista toimintaa ehtolauseen avulla. -->
<!-- - Tunnet ehtolauseissa tyypillisesti käytettävät vertailuoperaattorit ja loogiset operaatiot. -->
Expand Down
6 changes: 3 additions & 3 deletions data/part-10/2-interface-comparable.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Kerholaisten järjestäminen on nyt suoraviivaista. -->

Since the Member class implements the Comparable interface, it is possible to sort the list by using the `sorted` method. In fact, objects of any class that implement the `Comparable` interface can be sorted using the `sorted` method. Be aware, however, that a stream does not sort the original list - *only the items in the stream are sorted*.

If a programmer wants to organize the original list, the `sort` method of the` Collections` class should be used. This, of course, assumes that the objects on the list implement the `Comparable` interface.
If a programmer wants to organize the original list, the `sort` method of the `Collections` class should be used. This, of course, assumes that the objects on the list implement the `Comparable` interface.

Sorting club members is straightforward now.

Expand Down Expand Up @@ -210,11 +210,11 @@ You are provided with the class Human. A human has a name and wage information.

<!-- Saat valmiin luokan Opiskelija. Opiskelijalla on nimi. Toteuta Opiskelija-luokassa `Comparable`-rajapinta siten, että `compareTo`-metodi lajittelee opiskelijat nimen mukaan aakkosjärjestykseen. -->

The exercise template includes the class Student, which has a name. Implement the `Comparable` interface in the Student class in a way, such that the `compareTo` method sorts the students in alphabetical order based on their names.
The exercise template includes the class `Student`, which has a name. Implement the `Comparable` interface in the Student class in a way, such that the `compareTo` method sorts the students in alphabetical order based on their names.

<!-- **Vinkki:** Opiskelijan nimi on String, ja String-luokka on itsessään `Comparable`. Voit hyödyntää String-luokan `compareTo`-metodia Opiskelija-luokan metodia toteuttaessasi. `String.compareTo` kohtelee kirjaimia eriarvoisesti kirjainkoon mukaan, ja tätä varten String-luokalla on myös metodi `compareToIgnoreCase` joka nimensä mukaisesti jättää kirjainkoon huomioimatta. Voit käyttää opiskelijoiden järjestämiseen kumpaa näistä haluat. -->

**Hint:** The name of the Student is a String, which implements `Comparable` itself. You may use its `compareTo` method when implementing the method for the `Student` class. Note that `String.compareTo()` also treats letters according to their size, while the `compareToIgnoreCase` method of the same class ignores the capitalization completely. You may use either of these methods in the exercise.
The name of the `Student` is a String, which implements `Comparable` itself. You may use its `compareTo` method when implementing the method for the `Student` class. Note that `String.compareTo()` also treats letters according to their size, while the `compareToIgnoreCase` method of the same class ignores the capitalization completely. You may either of these methods in the exercise.

</programming-exercise>

Expand Down
7 changes: 5 additions & 2 deletions data/part-10/3-other-useful-techniques.md
Original file line number Diff line number Diff line change
Expand Up @@ -1189,8 +1189,8 @@ Make a class `Person`. The Person constructor takes a name and the education as
<!-- System.out.println(vilma); -->
<!-- ``` -->
```java
Person anna = new Person("Anna", Education.PHD)
System.out.println(anna)
Person anna = new Person("Anna", Education.PHD);
System.out.println(anna);
```
<sample-output>

Expand All @@ -1208,10 +1208,13 @@ Make a class `Employees`. Employees -object contains a list of Person -objects.

<!-- - `public void add(Person lisattava)` lisää parametrina olevan henkilön työntekijäksi -->
- `public void add(Person personToAdd)` adds the given person to the employees list

<!-- - `public void add(List<Person> lisattavat)` lisää parametrina olevan listan henkilöitä työntekijöiksi -->
- `public void add(List<Person> peopleToAdd)` adds the given list of people to the employees list

<!-- - `public void print()` printa kaikki työntekijät -->
- `public void print()` prints all employees

<!-- - `public void print(Education koulutus)` printa työntekijät joiden koulutus on sama kuin parametrissa määritelty koulutus -->
- `public void print(Education education)` prints the employees whose education matches the education given as a parameter.

Expand Down
4 changes: 2 additions & 2 deletions data/part-11/1-class-diagrams.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hidden: false
---


<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tunnet luokkakaavioiden merkintätavan ja osaat merkitä luokkakaavioon luokat, attribuutit, konstruktorit, ja metodit. -->
<!-- - Tunnet luokkien väliset yhteydet ja osaat merkitä luokkakaavioon perinnän sekä rajapinnan toteutuksen. -->
Expand Down Expand Up @@ -446,7 +446,7 @@ Class diagrams are an excellent way to describe a problem and a problem-domain t


<!-- Luokkakaavioita piirretään ohjelman suunnitteluvaiheessa usein esimerkiksi valkotaulua tai isompaa paperiarkkia käyttäen. Luokkakaaviot kannattaa ajatella poisheitettävinä tuotoksina, jotka auttavat ohjelman rakennuksessa. Kaavion piirtämiseen -- eli tyylin oikeellisuuteen ja yksityiskohtiin -- ei kannata käyttää liian pitkään aikaa. Vastaavasti kaavio kannattaa piirtää sopivalla abstraktiotasolla. Esimerkiksi kymmeniä luokkia sisältävään luokkakaavioon ei kannata merkitä jokaisen luokan jokaista metodia ja muuttujaa: oleellista on, että kaaviosta saa luotua nopean yleiskuvan. -->
Often a class diagram is drawn on a whiteboard or a large sheet of paper during the design phase. Class diagrams should be though of as helpful tools to build a program, which can be thrown away afterwards. You should not use too much energy to think about the correctness and details of the modeling language.
Often a class diagram is drawn on a whiteboard or a large sheet of paper during the design phase. Class diagrams should be thought of as helpful tools to build a program, which can be thrown away afterwards. You should not use too much energy to think about the correctness and details of the modeling language.
Class diagrams should also be drawn in a suitable level of abstraction. For example, if you have tens of classes, it might not be worth describing each attribute and each method of each class; getting a good overview of the program structure is the most important.


Expand Down
4 changes: 2 additions & 2 deletions data/part-11/2-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ hidden: false

</text-box> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

- You know what packages are and can place classes in them

Expand Down Expand Up @@ -663,7 +663,7 @@ The package structure of the program could look like the following (for example)

<!-- - `lentokentta.domain` - sisältää aihealueen käsitteitä kuvaavat luokat `Lentokone`, `Lento`, ja `Paikka`. -->

- `flightControl.domain` - includes the classes that represent concepts of the probelm domain: `Airplane`, `Flight`, and `Place`
- `flightControl.domain` - includes the classes that represent concepts of the problem domain: `Airplane`, `Flight`, and `Place`

<!-- - `lentokentta.logiikka` - sisältää toiminnallisuuden, jonka avulla sovellusta hallinnoidaan -->

Expand Down
2 changes: 1 addition & 1 deletion data/part-11/3-exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hidden: false



<text-box variant='learningObjectives' name='Oppimistavoitteet'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tiedät mitä poikkeukset ovat ja osaat varautua poikkeuksiin. -->
<!-- - Osaat heittää poikkeuksia. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-12/1-type-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hidden: false

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tiedät mitä käsitteellä geneerinen tyyppiparametri tarkoitetaan. -->

Expand Down
4 changes: 2 additions & 2 deletions data/part-12/2-arraylist-and-hashtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hidden: false

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tiedät miten miten muuttuvansizeinen geneerinen myList toteutetaan. -->

Expand Down Expand Up @@ -593,7 +593,7 @@ This exercise is worth 2 points.

<!-- Hajautustaulu on toteutettu taulukkona, missä jokainen alkio sisältää myListn. Listalle tallennetaan (avain,value)-pareja. Käyttäjä voi hakea hajautustaulusta firstFreeIndex avaimen perusteella, ja toisaalta käyttäjä voi lisätä hajautustauluun avain-value -pareja. Kukin avain voi esiintyä hajautustaulussa korkeintaan kerran. -->

Hash map is implemented as an array, in which every element includes a list. The lists contain (key, value) pairs. The user can search from the hash map based on the key, and they can also add new key-value pairs into it. Eech key can appear at most once in the hash map.
Hash map is implemented as an array, in which every element includes a list. The lists contain (key, value) pairs. The user can search from the hash map based on the key, and they can also add new key-value pairs into it. Each key can appear at most once in the hash map.

<!-- Hajautustaulun toiminta perustuu avaimen hajautusvalueon. Kun hajautustauluun lisätään (avain,value)-pari, lasketaan avaimeen liittyvä hajautusvalue. Hajautusvalue määrää hajautustaulun sisäisen taulukon indexn, missä olevaan myListan (avain,value)-pari lisätään. -->

Expand Down
2 changes: 1 addition & 1 deletion data/part-12/3-randomness.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hidden: false
---


<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tiedät miten satunnaislukuja luodaan ja tiedät joitakin tilanteita missä satunnaislukuja tarvitaan. -->
<!-- - Osaat käyttää Javan valmista Random-luokkaa satunnaislukujen luomiseen. -->
Expand Down
5 changes: 4 additions & 1 deletion data/part-12/4-multidimensional-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Multidimensional data'
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tunnet menetelmiä moniulotteisen tiedon esittämiseen. -->
<!-- - Osaat luoda ja käyttää moniulotteisia taulukoita. -->
Expand Down Expand Up @@ -87,6 +87,7 @@ for (int row = 0; row < twoDimensionalArray.length; row++) {
```

<!-- Nyt tulostus näyttää seuraavalta: -->

The program output is as follows:

<sample-output>
Expand Down Expand Up @@ -327,7 +328,9 @@ We can implement the same functionality using a hash table. Wouldn't a hash tabl
<!-- Kun hajautustaulusta haetaan tietoa tietyllä avaimella, metodin hashCode perusteella selvitetään paikka, mistä tietoa haetaan. Samassa paikassa voi olla useampi value (listassa), jolloin haettavaa avainta verrataan jokaiseen listalla olevaan valueon equals-metodia käyttäen. Kun taulukosta haetaan valuea tietyllä avaimella -- eli indeksillä -- ei vastaavaa toiminnallisuutta tarvitse tehdä. Taulukossa joko on value tai valuea ei ole. Taulukkoon liittyy pieni tehokkuushyöty ohjelman suorituskyvyn kannalta. -->
When we search for a value of a key from a hash table, we use the hashCode method to find the index to search from.
There can be multiple values at the same index (on a list). Then we have to compare the key we want to find the value for to the key of each key-value pair on the list using the equals method.

When we search for a value of a key -- or index -- in an array, we do not have to do any of that.

An array either contains a certain value or it does not, so there is a small performance beneft on using arrays.

<!-- Tämä tehokkuushyöty kuitenkin tulee lisääntyneen virhealttiuden sekä työmäärän kustannuksella. Hajautustauluun on valmiiksi toteutettuna sisäisen taulukon kasvattaminen ja sen toiminnallisuutta on testattu hyvin laajasti. Taulukkoa käytettäessä tällaista etua ei ole -- uutta toiminnallisuutta toteuttaessa saattaa päätyä virheisiin, mikä kasvattaa työmäärää. Virheet ovat toki luonnollinen osa ohjelmistokehitystä. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-13/2-UI-components-and-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'UI components and their layout'
hidden: false
---

<text-box variant='learningObjectives' name='Oppimistavoitteet'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tiedät mistä käyttöliittymät koostuvat ja osaat käynnistää graafisen käyttöliittymän.
- Tunnet muutamia käyttöliittymäkomponentteja ja osaat lisätä niitä käyttöliittymään.
Expand Down
2 changes: 1 addition & 1 deletion data/part-13/5-multiple-views.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ hidden: false

</text-box> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

- You proctice adding multiple views to a graphical interface.
- You know methods for changing the view.
Expand Down
2 changes: 1 addition & 1 deletion data/part-14/3-larger-application-asteroids.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hidden: false


<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->
<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tiedät tavan interaktiivisen pelin toteuttamiseen. -->
<!-- - Näet miten laajempi sovellus rakentuu askel askeleelta. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-14/4-maven-and-third-party-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: 'Maven and third-party libraries'
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tunnet käsitteen kirjasto ja tiedät muutamia kolmannen osapuolen kirjastoja. -->
<!-- - Tiedät mistä kirjastoja voi etsiä. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-2/4-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hidden: false
---

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->
<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>
<!-- - Tunnet käsitteet metmetodin parametri, metodin palautusarvo ja ohjelman kutsupino. -->

- You are familiar with the concepts of a method parameter, a method's return value, and a program's call stack.
Expand Down
2 changes: 1 addition & 1 deletion data/part-3/2-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hidden: false

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tunnet listarakenteen ja osaat käyttää listaa osana ohjelmia. -->

Expand Down
2 changes: 1 addition & 1 deletion data/part-4/2-objects-in-a-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hidden: false

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>


<!-- - Osaat lisätä olioita listalle. -->
Expand Down
2 changes: 1 addition & 1 deletion data/part-5/2-method-and-constructor-overloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Removing repetitive code (overloading methods and constructors)'
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

- Becoming familiar with the term overloading
- Creating multiple constructors for a class.
Expand Down
2 changes: 1 addition & 1 deletion data/part-5/3-primitive-and-reference-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hidden: false

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>


<!-- - Tunnet käsitteet alkeistyyppinen muuttuja ja viittaustyyppinen muuttuja. -->
Expand Down
8 changes: 4 additions & 4 deletions data/part-5/4-objects-and-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hidden: false

<!-- <text-box variant='learningObjectives' name='Oppimistavoitteet'> -->

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>


<!-- - Kertaat luokkien ja olioiden toimintaa. -->
Expand Down Expand Up @@ -1819,7 +1819,7 @@ Both variables contain a reference to an object. Therefore a person object conta

<!-- Pääohjelmalla on nyt siis langan päässä kaksi Henkilö-olioa. Henkilöllä on nimi ja syntymäpäivä. Koska molemmat ovat olioita, ovat ne henkilöllä langan päässä. -->

So the main program has is connected to two Person objects by strands. A person has a name and a birthday. Since both variables are objects, these attributes exist at the other ends of the strands.
So the main program is connected to two Person objects by strands. A person has a name and a birthday. Since both variables are objects, these attributes exist at the other ends of the strands.


<!-- Syntymäpäivä vaikuttaa hyvältä laajennukselta Henkilö-luokkaan. Totesimme aiemmin, että oliomuuttuja `ika` voidaan laskea syntymäpäivästä, joten siitä hankkiuduttiin eroon. -->
Expand Down Expand Up @@ -2437,8 +2437,8 @@ Apartment manhattanStudioApt = new Apartment(1, 16, 5500);
Apartment atlantaTwoBedroomApt = new Apartment(2, 38, 4200);
Apartment bangorThreeBedroomApt = new Apartment(3, 78, 2500);

System.out.println(manhattanSingleRoomApt.priceDifference(atlantaTwoRoomApt)); //71600
System.out.println(bangorThreeRoomApt.priceDifference(atlantaTwoRoomApt)); //35400
System.out.println(manhattanStudioApt.priceDifference(atlantaTwoBedroomApt)); //71600
System.out.println(bangorThreeBedroomApt.priceDifference(atlantaTwoBedroomApt)); //35400
```


Expand Down
4 changes: 2 additions & 2 deletions data/part-6/2-separating-user-interface-from-program-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Separating the user interface from program logic"
hidden: false
---

<text-box variant='learningObjectives' name='Learning objectives'>
<text-box variant='learningObjectives' name='Learning Objectives'>

<!-- - Tutustut sovelluksen luomiseen siten, että käyttöliittymä ja sovelluslogiikka ovat erillään. -->
<!-- - Osaat luoda tekstikäyttöliittymän, joka saa parametrinaan sovelluskohtaisen sovelluslogiikan sekä syötteen lukemiseen käytettävän Scanner-olion. -->
Expand Down Expand Up @@ -1297,7 +1297,7 @@ Command: **add**
Word: **pike**
Translation: **hauki**
Command: **change**
Unkown command
Unknown command
Command: **search**
To be translated: **pike**
Translation: hauki
Expand Down
Loading