The referenced paragraph does not exist.
The referenced paragraph does not exist.
Ohjelmointi 1, syksy 2016, luento 24
Versionhallinnassa
- lähtötilanne: svn export https://svn.cc.jyu.fi/srv/svn/ohj1/esimerkit/2016s/luennot/live24
- lopputilanne: svn export https://svn.cc.jyu.fi/srv/svn/ohj1/esimerkit/2016s/luennot/luento24
- luento pidetään TIMin luentokyselyillä
- luennolle tarvitaan tietokone/täppäri/älypuhelin, koittakaa pariutua
- Javan ja C#:in vertailua
- Katso luento 24 pohja
- Pallot.cs - alkuperäinen versio
- attribuutien poistoa - kurssin taidoilla
- Pallot.cs - käytetään ref-parametrin välitystä (erona alkuperäiseen)
- Luennolle tehdyt koodit versionhallinnassa
- 24. luento videona: Osa 1 MP4 alkuperäinen, MP4 kännykkäversio
- luentoseinä
Pallot
#
Plugin1
Kysymyksiä
expl: {}
json:
answerFieldType: radio
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: '0'
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: '1'
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: '2'
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: '3'
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: '4'
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: '5'
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: '6'
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: '7'
type: question
matrixType: ''
questionText: "1) Montako neliötä ohjelma piirtää"
questionType: radio-vertical
timeLimit: 31
title: "neliötä"
points: '1:1'
expl: {}
json:
answerFieldType: radio
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: '0'
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: '1'
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: '2'
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: '3'
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: '4'
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: '5'
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: '6'
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: '7'
type: question
matrixType: ''
questionText: "2) Montako ympyrätä ohjelma piirtää"
questionType: radio-vertical
timeLimit: 120
title: montako
points: '4:1'
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: Pallot
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: PhysicsGame
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: pallo
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: Begin
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: Vaihda
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: Color
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: Lisaa
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: Luo
type: question
- columns:
- {id: 0, rowId: 8, type: answer}
id: 8
text: return
type: question
matrixType: ''
questionText: "3) Ohjelmassa on metodit (olion omat aliohjelmat jotka tarvitsevat\
\ this-viitettä) nimeltään"
questionType: checkbox-vertical
timeLimit: 50
title: metodit
points: 4:0.4;5:0.3;7:0.3
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: Pallot
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: PhysicsGame
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: pallo
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: Begin
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: Vaihda
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: Color
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: Lisaa
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: Luo
type: question
- columns:
- {id: 0, rowId: 8, type: answer}
id: 8
text: return
type: question
matrixType: ''
questionText: "4) Ohjelmassa on funktiot (aliohjelmia jotka palauttavat arvon ja\
\ toimivat ilman this-viitettä) nimeltään"
questionType: checkbox-vertical
timeLimit: 50
title: funktioita
points: '8:1'
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: pallo
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: x
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: y
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: p
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: peli
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: this
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: o
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: PhysicsObject
type: question
matrixType: ''
questionText: "5) Mitä lokaaleja muuttujia tai attribuutteja (myös viitteet\
\ lasketaan) näkyy Begin-metodissa"
questionType: checkbox-vertical
timeLimit: 50
title: Begin
points: 1:0.25;2:0.25;4:0.25;6:0.25
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: pallo
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: x
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: y
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: p
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: peli
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: this
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: o
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: c
type: question
matrixType: ''
questionText: "6) Mitä lokaaleja muuttujia tai attribuutteja (myös viitteet\
\ lasketaan) näkyy Vaihda-metodissa"
questionType: checkbox-vertical
timeLimit: 50
title: Vaihda
points: 1:0.25;2:0.25;6:0.25;8:0.25
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: pallo
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: x
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: y
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: p
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: peli
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: this
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: o
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: c
type: question
matrixType: ''
questionText: "7) Mitä lokaaleja muuttujia tai attribuutteja (myös viitteet\
\ lasketaan) näkyy Lisaa-metodissa"
questionType: checkbox-vertical
timeLimit: 40
title: Lisaa
points: 1:0.3;2:0.3;6:0.4;8:0.25
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: pallo
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: x
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: y
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: p
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: peli
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: this
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: o
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: c
type: question
matrixType: ''
questionText: "8) Mitä lokaaleja muuttujia tai attribuutteja (myös viitteet\
\ lasketaan) näkyy Luo-funktiossa"
questionType: checkbox-vertical
timeLimit: 50
title: Luo
points: 2:0.25;3:0.25;5:0.25;7:0.25
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: Begin
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: Peli
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: Vaihda
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: Lisaa
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: Color
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: Luo
type: question
matrixType: ''
questionText: "9) Missä metodeissa/aliohjelmissa tehty sijoitus x=10 vaikuttaa\
\ rivillä 12 esiteltyyn x:ään"
questionType: checkbox-vertical
timeLimit: 40
title: x
points: 1:0.4;3:0.3;4:0.3
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: y = 30;
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: x = 20;
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: pallo++;
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: p.Color = Color.Green;
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: Lisaa();
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: return;
type: question
matrixType: ''
questionText: "10) Mitkä seuraavista aiheuttavat virheen jos ne kirjoitetaan\
\ Vaihda-metodin loppuun (yksitellen kokeiltuina)"
questionType: checkbox-vertical
timeLimit: 50
title: virheen
points: 1:0.4;3:0.3;4:0.3
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: Tulee yksi pallo (keltainen)
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: Tulee kaksi keltaista palloa
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: "Näkyy 1 valkoinen ja 1 punainen pallo"
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: "Ohjelma ei käänny"
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: Tulee ajonaikainen virhe
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: "En tiedä"
type: question
matrixType: ''
questionText: "11) Muutetaan rivi 33 muotoon Luo(this, ...). Mitä tapahtuu."
questionType: checkbox-vertical
timeLimit: 50
title: muutetaan
points: '5:1'
expl: {}
json:
answerFieldType: checkbox
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: pallo
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: x
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: y
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: this
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: p
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: c
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: o
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: peli
type: question
matrixType: ''
questionText: "12) Mitkä ovat viitemuuttujia (aliohjelmasta riippumatta)"
questionType: checkbox-vertical
timeLimit: 50
title: viite
points: 1:0.2;4:0.2;5:0.2;6:0.1;7:0.1;8:0.2
expl: {}
json:
answerFieldType: radio
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: '0'
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: '1'
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: '2'
type: question
- columns:
- {id: 0, rowId: 3, type: answer}
id: 3
text: '3'
type: question
- columns:
- {id: 0, rowId: 4, type: answer}
id: 4
text: '4'
type: question
- columns:
- {id: 0, rowId: 5, type: answer}
id: 5
text: '5'
type: question
- columns:
- {id: 0, rowId: 6, type: answer}
id: 6
text: '6'
type: question
- columns:
- {id: 0, rowId: 7, type: answer}
id: 7
text: "en tiedä"
type: question
matrixType: ''
questionText: 13) Montako luokkaa ohjelmassa on itse tehty
questionType: radio-vertical
timeLimit: 20
title: montako
points: '2:1'
expl: {}
json:
answerFieldType: radio
data:
headers: []
rows:
- columns:
- {id: 0, rowId: 0, type: answer}
id: 0
text: ei
type: question
- columns:
- {id: 0, rowId: 1, type: answer}
id: 1
text: voi
type: question
- columns:
- {id: 0, rowId: 2, type: answer}
id: 2
text: "En tiedä"
type: question
matrixType: ''
questionText: 14) Voiko vaihda olla static
questionType: radio-vertical
timeLimit: 25
title: Voiko
points: '2:1'
expl: {}
json:
answerFieldType: text
data:
headers:
- {id: 1, text: '', type: header}
rows:
- columns:
- {id: 1, rowId: 0, type: answer}
id: 0
text: ''
type: question
matrixType: textArea
questionText: 15) Miksi voi
questionType: matrix
timeLimit: 50
title: Miksi
points: ''
These are the current permissions for this document; please modify if needed. You can always modify these permissions from the manage page.