61
Objektorienteeritud programmeerimine 8. loeng 26. märts Eno Tõnisson 1

Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Objektorienteeritud programmeerimine

8. loeng

26. märts

Eno Tõnisson

1

Page 2: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kasutatud

• H. Heina loengumaterjalid

• J. Kiho Väike Java leksikon

• Y. D. Liang Introduction to Java Programming

2

Page 3: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Eelmisel nädalal

• loeng

– tunnikontroll

– graafiline kasutajaliides

• praktikum

– abstraktsed klassid, liidesed

• kevade algus, üleminek suveajale

3

Page 4: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Järeltöö

• Järeltöö 30. märtsil 16.15 või 4. aprillil 8.15, registreerimine ÕISis.

• Oma kontrolltöö analüüs. Vt. Moodle’is

4

Page 5: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Umbes mitu tundi tegelesite eelmisel nädalal selle ainega (loeng+praktikum+iseseisvalt)?

1. paariline

5

1. 2. 3. 4. 5. 6. 7. 8.

0% 0% 0% 0%0%0%0%0%

1. 0-2 tundi

2. 2-4 tundi

3. 4-6 tundi

4. 6-8 tundi

5. 8-10 tundi

6. 10-12 tundi

7. 12-14 tundi

8. üle 14 tunni

Page 6: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kuivõrd olete selle ainega graafikus? 1. paariline

6

1. 2. 3. 4. 5.

0% 0% 0%0%0%

1. Isegi ees

2. Täiesti graafikus

3. Veidi maas, aga saan ise hakkama

4. Kõvasti maas, vajan abi

5. Ei oska öelda

Page 7: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Umbes mitu tundi tegelesite eelmisel nädalal selle ainega (loeng+praktikum+iseseisvalt)?

2. paariline

7

1. 2. 3. 4. 5. 6. 7. 8.

0% 0% 0% 0%0%0%0%0%

1. 0-2 tundi

2. 2-4 tundi

3. 4-6 tundi

4. 6-8 tundi

5. 8-10 tundi

6. 10-12 tundi

7. 12-14 tundi

8. üle 14 tunni

Page 8: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kuivõrd olete selle ainega graafikus? 2. paariline

8

1. 2. 3. 4. 5.

0% 0% 0%0%0%

1. Isegi ees

2. Täiesti graafikus

3. Veidi maas, aga saan ise hakkama

4. Kõvasti maas, vajan abi

5. Ei oska öelda

Page 9: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Täna

• Natuke kordavalt

– juhuslik arv

– konstruktorid

• Graafiline kasutajaliides

• Tunnikontrollist

– tulevikust

9

Page 10: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Juhuslik arv

• Iga kord tuleb erinev!?

• Math.random()

– Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range.

• Juhuslik, pseudojuhuslik

– Varem täringutega, kaartidega, ruletiga, juhuslike arvude tabelist.

10

Page 11: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Raamatust A Million Random Digits with 100,000 Normal Deviates

1955. a. RAND Corporation

11

Page 13: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kas Math.random() võib kunagi tagastada

väärtuse 0.0?

13 1. 2.

0%0%

1. Jah

2. Ei

Page 14: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kas Math.random() võib kunagi tagastada

väärtuse 1.0?

14 1. 2.

0%0%

1. Jah

2. Ei

Page 15: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kui tahame juhuslikku täisarvu lõigust [10; 16]

• Kirjutage paberile, kuidas seda saada?

15

Page 16: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Milline järgnevatest annab juhusliku täisarvu lõigust [10; 16]?

16 1. 2. 3. 4. 5.

0% 0% 0%0%0%

1. Valik 1

2. Valik 2

3. Valik 3

4. Valik 4

5. Valik 5

Page 17: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

17 1. 2.

0%0%

Millises piirkonnas annab väärtusi 6*Math.random()?

1. [0.0; 6.0]

2. [0.0; 6.0)

Page 18: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

18 1. 2.

0%0%

Kas 10+6*Math.random()annab väärtusi piirkonnas [10.0; 16.0)?

1. Jah

2. Ei

Page 19: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

19 1. 2. 3.

0% 0%0%

Mis ilmub ekraanile?

System.out.println((int)-0.6);

1. 0

2. -1

3. veateade

Page 20: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

20 1. 2. 3.

0% 0%0%

Mis ilmub ekraanile?

System.out.println(Math.round(-0.6));

1. 0

2. -1

3. veateade

Page 21: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

21 1. 2. 3. 4.

0% 0%0%0%

Mida võib öelda Math.round(10+6*Math.random()) puhul 10 ja 11 tuleku tõenäosuse kohta?

1. ligikaudu võrdse tõenäosusega

2. 10 tuleb ligikaudu kaks korda tihemini kui 11

3. 10 tuleb ligikaudu kaks korda harvemini kui 11

4. midagi muud

Page 22: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kas ühtlase jaotusega?

22

Page 23: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Klass Random

• http://docs.oracle.com/javase/7/docs/api/java/util/Random.html

• Random rand1 = new Random();

• Random rand2 = new Random(20);

• nextBoolean, nextDouble, nextGaussian, nextInt

23

Alati sama seeria

Page 24: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Klassi Random alamklass

• The serializable class Juhuslik does not declare a static final serialVersionUID field of type long

24

import java.util.Random;

public class Juhuslik extends Random {

int juhuslikTäisarv(int a, int b){

return a + this.nextInt(b - a);

}

}

Juhuslik juh = new Juhuslik();

System.out.println(

juh.juhuslikTäisarv(2, 4));

Page 25: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Konstruktorid

• Alamklasside koostamisel võib tekkida vigu konstruktoritega seoses

• Seosed ülemklassi konstruktoritega

• Ei pärita

• Konstruktorite aheldamine (ingl. k. chaining).

25

Page 26: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Alamklassi konstruktor

• peab tagama ülemklassi konstruktori rakendamise – et alamklassi isend oleks ka ülemklassi isend

• Konstruktor võib välja kutsuda – üledefineeritud konstruktori (this(...))

– vahetu ülemklassi konstruktori (super(...)).

• Kui kumbagi neist ei ole kasutatud, siis kompilaator lisab käsu super() konstruktori esimeseks lauseks.

26

Page 27: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

super

27

public A(){

}

public A(){

super();

}

public A(int i){

super();

//laused

}

public A(int i){

//laused

}

sama

sama

Page 28: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

28 1. 2.

0%0%

Kas kompileerub?

public class KlassA {

int a;

}

1. Jah

2. Ei

Page 29: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

29 1. 2.

0%0%

Kas saab isendi luua?

public class KlassA {

int a;

}

KlassA ka = new KlassA(); 1. Jah

2. Ei

Page 30: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

30 1. 2.

0%0%

Kas kompileerub?

public class KlassA {

int a;

}

1. Jah

2. Ei

public class KlassB extends KlassA {

int b;

}

Page 31: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

31 1. 2.

0%0%

Kas kompileerub?

public class KlassA {

int a;

}

1. Jah

2. Ei

public class KlassB extends KlassA {

int b;

KlassB(){

a = 23;

b = 12;

}

}

Page 32: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

32 1. 2.

0%0%

Kas kompileerub?

public class KlassA {

int a;

}

1. Jah

2. Ei

public class KlassB extends KlassA {

int b;

KlassB(){

super();

a = 23;

b = 12;

}

}

Page 33: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

33 1. 2.

0%0%

Kas kompileerub? public class KlassA {

int a;

KlassA(int arv){

}

}

1. Jah

2. Ei

public class KlassB extends KlassA {

int b;

KlassB(){

super();

a = 23;

b = 12;

}

}

Page 34: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

34

public class KlassA {

int a;

KlassA(int arv){

}

KlassA() {

}

}

public class KlassB extends KlassA {

int b;

KlassB(){

super();

a = 23;

b = 12;

}

}

Page 35: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

35 1. 2. 3.

0% 0%0%

Mida väljastatakse ekraanile?

public class KlassA {

int a;

KlassA(int arv){

}

KlassA() {

a = 45;

}

}

KlassB kb = new KlassB();

System.out.println(kb.a);

public class KlassB extends KlassA {

int b;

KlassB(){

b = 12;

}

} 1. 45

2. 0

3. Veateade

Page 36: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kasutajaliidesega edasi

• Olid raamid, tahvlid, nupud jm.

• Olid sündmused

36

Page 37: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Sündmus

• ingl. Event • Mis tekitab

– kasutaja tegevus • hiire liigutamine, klahvi vajutamine …

– operatsioonisüsteem • aeg sai täis …

• Sündmuse allikas (source) – objekt, millega sündmus juhtus

• nupp, komponent, tekstiväli …

– kui sündmus toimub, siis sellest teatatakse neile, kes on registreerunud kuulama

• Java mõttes sündmusklassi isend – nende ülemklass on java.util.EventObject – nt. ActionEvent, WindowEvent, KeyEvent, MouseEvent

37

Page 38: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kuular

• ingl. k. Listener

• Kuular ootab sündmuse toimumist ja siis reageerib

• On valmis reageerima kuni programm töötab

• Peab olema klassist, mis realiseerib vastava kuulari liidese, nt. ActionListener, WindowListener, KeyListener, …, MouseMotionListener

38

Page 39: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Sündmus toimus

• Sama sündmust võib kuulata mitu erinevat kuularit.

• Iga kuular, kes oli registreerunud antud allika juurde antud liiki sündmusi kuulama, saab oma koopia.

• Kuulari registreerimine – nt. nupp1.addActionListener(kuular1);

• Sündmuse isendi käest saab küsida, – milline objekt selle tekitas

• e.getSource()

– millal sündmus toimus • e.getWhen()

– …

39

Page 40: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

40

import java.awt.event.ActionEvent;

import java.awt.event.ActionListener;

public class NupuKuular implements ActionListener {

public void actionPerformed(ActionEvent e) {

System.out.println("Nuppu " + e.getActionCommand() +

" vajutati " + new java.util.Date(e.getWhen()));

}

}

Page 41: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

41

import java.awt.*;

import javax.swing.*;

import java.util.*;

public class Kuularid {

public static void main(String[] args) {

JFrame raam = new JFrame("Meie raam");

raam.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

raam.setSize(300, 200);

raam.setLayout(new FlowLayout());

JButton nupp1 = new JButton("Olen nõus");

JButton nupp2 = new JButton("Ei ole nõus");

NupuKuular kuular1 = new NupuKuular();

nupp1.addActionListener(kuular1);

nupp2.addActionListener(kuular1);

raam.add(nupp1);

raam.add(nupp2);

raam.setVisible(true);

}

}

Page 42: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

42

Page 43: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Sündmuste hierarhia

43

Page 44: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kuularite tegemine • Liidese kõik meetodid realiseerida

– nt. liidese WindowListener korral meetodid windowClosed, windowIconified, windowOpened, windowClosing, windowDeiconified, windowActivated, windowDeactivated

• Luua vastava adapterklassi alamklass

– katta üle vaid need, mis meid huvitavad

44

import java.awt.event.*;

public class RaamiAdapter extends WindowAdapter {

public void windowIconified (WindowEvent e) {

System.out.println("Aken muutus ikooniks");

}

}

Page 45: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Graafikakomponente

45

Page 46: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Eelmisel korral

• Raam ühes klassis – JFrame raam = new JFrame("Raadio");

– JRadioButton nupp1 = new JRadioButton("B",true);

– raam.add(nupp1);

• Kuulari jaoks teine klass – class NupuKuular implements ActionListener

– void actionPerformed(ActionEvent e)

46

Page 47: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Kas klassikirjelduses võib olla teise klassi kirjeldus?

47 1. 2.

0%0%

1. Jah

2. Ei

Page 48: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Proovime teisiti

• Klassi JFrame alamklassina

• Siseklass kuulari jaoks

48

Page 49: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

49

Page 50: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

50

Page 51: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Sündmused, mida ei tekita kasutaja

• Klass Timer

51

Page 52: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Tunnikontroll • Anonüümne • Mõelge teistele ja endale • Kuidas suhtute klikkerite kasutamisse

– üldküsimused alguses ja lõpus – küsimused asjade kohta, mida pole veel täpsemalt käsitletud – küsimused teadmiste kontrolliks – …

• Loengu punktide jaotus – 12 punkti – 6 jagatud (kohal või video) – Kuidas edasi? – Tunnikontrollid

• Eksamikorraldus – 90 minutit – ilma arvutita – ilma materjalideta – 36 punkti

52

Page 53: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

53

Üldiselt on klikkerid üks suur põhjus, miks ma ennast iga esmaspäev loengusse vean.

Ma usun, et klikkerite kasutamine annab võimaluse loengus aktiivselt kaasa lüüa ka neile tudengitele, kes muidu kardaksid kõva häälega küsimustele vastata.

Page 54: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

54

Saad avaldada oma arvamust suud lahti tegemata ja anonüümselt. Nagu neti kommentaator :-)

Klikkerid on huvitavad, peavad kindlasti jääma. Alati on hea teada, et sa pole ainuke loll.

Page 55: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

55

Kui on näha, et küsimusele vastatakse, kas ebakindlalt või on läinud teatud variantide puhul "rebimiseks", algab diskussioon. See on mõnus ning siis saavad ka häbelikud isendid teada, miks nende vastusel just selline tõeväärtus on.

Page 56: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Teadmiste kontrollist

• Tunnikontrollid

– tulevad

• Eksam

– näidisülesanded tulevad

56

Page 57: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Loengu tempo oli 1. paariline

57 1. 2. 3.

0% 0%0%

1. liiga kiire

2. paras

3. liiga aeglane

Page 58: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Materjal tundus 1. paariline

58 1. 2. 3.

0% 0%0%

1. liiga lihtne

2. parajalt jõukohane

3. liiga keeruline

Page 59: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Loengu tempo oli 2. paariline

59 1. 2. 3.

0% 0%0%

1. liiga kiire

2. paras

3. liiga aeglane

Page 60: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Materjal tundus 2. paariline

60 1. 2. 3.

0% 0%0%

1. liiga lihtne

2. parajalt jõukohane

3. liiga keeruline

Page 61: Objektorienteeritud programmeerimine - utkodu.ut.ee › ~eno › oop12loeng › oop12loeng8b.pdf · •Math.random() –Returned values are chosen pseudorandomly with (approximately)

Suur tänu osalemast! Kohtumiseni!

61