Sie sind auf Seite 1von 4

MIDTERM1VAR2

1.InAlice,wecanavoidobjectcollisionusingwhat?
Slowingmovementsdown.
Usingmathoperators.(*)
DownloadingtheAlice3collisiondetectorapp.
Usingobjectdetection.
2.FromyourAlicelessons,whichofthefollowingareexamplesofscenarios?
Conflictandresolutioninaplay
Processtosimulate
Processtodemonstrate
Gametoplay
Alloftheabove(*)
3.InAlice,whichofthefollowingisthemostlikelysituationwhereproceduralabstractioncould
beused?
Fivedogsallneedtobarkandrunatthesametime.(*)
Onefishneedstoswimforward1meter.
Twofishsaysomethingtoeachother.
Onepersonmovesup10meters.
4.InAlice,objectsinheritthecharacteristicsoftheir:
Code
Project
Class(*)
Program
5.InAlice,inheritancemeansthatthesuperclassinheritsitstraitsfromthesubclass.Trueorfalse?
True
False(*)
6.InAlice,whichfunctionisusedtomoveanobjectdirectlytothecenterpointofanotherobject?
getObject
getDuration
getDepth
getDistance(*)
7.DoInOrderandDoTogetheraretheonlycontrolstatementsavailableinAlice.Trueorfalse?
True
False(*)
8.InAlice,onceproceduresareaddedtoacontrolstatement,theycannotbechanged.Trueor
false?
True
False(*)
9.WhichofthefollowingareexamplesofcommentswritteninanAliceprogram?
this.dogmoveforward2
this.catturnleft0.5
Boyrunstothegirl.(*)
Catjumpsintothetreeandmeowsforhelp.(*)
10.IntheAlicesceneeditor,wherearetheprocedureslocatedtopreciselypositionanobject?
Rightclickontheobject,thenselectProcedures.(*)
Rightclickontheobject,thenselectRemove.
Inthegalleryofclasses.
Inthepackagelocatedinthegallery.
11.Besidesinvokingaprocedure,anotherwaytopreciselypositionanAliceobjectistoenter
valuesinthex,y,andzcoordinatesinthePositionproperty.Trueorfalse?
True(*)
False
12.Aliceobjectsmoverelativetotheorientationofthepersonviewingtheanimation.Trueor
false?
True
False(*)
13.Thevaluethatavariableholdsmustbeawholenumber,notadecimal.Trueorfalse?
True
False(*)
Midterm1var2

14.DefinethevalueofthevariableNumSpinsbasedonthefollowingmathcalculation:
NumSpins/3=8
12
24(*)
8
NumSpins
15.FromyourAlicelessons,the"ChecklistforAnimationCompletion"doesnotaskquestions
aboutthescenarioandstoryboards,becausethesearenotvalidpartsoftheanimationcreation
process.Trueorfalse?
True
False(*)
6.FromyourAlicelessons,whichcontrolstatementexecutesinstructionssimultaneously?
Doinorder
Count
Variable
Dotogether(*)
17.InAlice,whichofthefollowinginstructionsrolltheBlueTangfishleft1meter?
this.blueTangrollLeft1.0(*)
this.blueTangLeft1.0
this.blueTangLeft1
this.blueTangrollLeft1
18.HowdoyoucopyanAliceprocedure?
Dragtheprocedureintotheclipboard,thenclickCTRL+C.
Holddownthecontrol(CTRL)key,thendragtheprocedureintotheclipboard.(*)
Dragtheprocedureintotheclipboard.
SelectCopyintheRunmenu.
19.Expressionswithrelationaloperatorsproducetrueandfalsevalues.Trueorfalse?
True(*)
False
20. InAlice,wherearearithmeticoperatorsavailable?
Amountargument(*)
Sizeargument
Durationargument(*)
GetDistancefunctions(*)
Ifcontrol
21.WhichofthefollowingisnotanexampleofthelogicofanIFcontrolstructure?
Playthevideothreetimes.(*)
Iftheplaybuttonispressed,thenplaythevideoonetime.
Ifthedoorbellrings,thenthedooropens.
Ifthebirdringsthebell,atreatisdispensed.
22.TheconditioninaWHILEloopisabooleanexpression.Trueorfalse?
True(*)
False
23.WhatAlicetoolcanbeusedtodiagramtheIfconditionalexecutionstatement?
Causeandeffectdiagram
Processflowdiagram(*)
Conditionalflowdiagram
24.TheAliceIfcontrolstructurerequiresthefalsestatementtobepopulated.Trueorfalse?
True
False(*)
25.Aconditionalloopisaloopthatwillcontinueforever.Trueorfalse?
True False(*)
26. FromyourGreenfootlessons,theresetbuttonresetsthescenariobacktoitsinitialposition.
Trueorfalse?
True(*)
False
27.InGreenfoot,asubclassiscreatedbyrightclickingonasuperclass.Trueorfalse?
True(*)
False
28.FromtheGreenfootIDE,whereareinheritedmethodslocated?
Inthecomputernetwork
Midterm1var2

IntheGreenfootimagegallery
Inthesceneeditor

29.WhatdoesthefollowingGreenfootprogrammingstatementdo?turn(18)
Turntheobject36degrees.
Turntheobject18degrees.(*)
Turntheobject18stepsforward.
Movetheobject18stepsforward.
30.IntheGreenfootIDE,whichtypeofvariableallowsinstancestostoreinformation?
Methodvariable
Instancevariable(*)
Classvariable
Worldvariable
31.UseyourGreenfootknowldege:Abstractionoccursinmanydifferentwaysinprogramming.
Trueorfalse?
True(*)
False
32.FromyourGreenfootlessons,abstractiontechniquescanonlybeusedonceinaclass'ssource
code.Trueorfalse?
True
False(*)
33.FromyourGreenfootlessons,whatarethewaysthatyoucanviewaclass'smethods?

Inthescenario
Intheclass'sdocumentation(*)
Byrightclickingonaninstance(*)
IntheGreenfootgallery
34.UseyourGreenfootknowledge:Aspecificationofamethodiscalleda__________________.
Subclass
Class
Signature(*)
Parameter
35.InGreenfoot,dotnotationisusedtocalla_____________fromanotherclass.
Method(*)
Class
Signature
Parameter
36.InGreenfoot,definedmethodsmustbeusedimmediately.Trueorfalse?
True
False(*)
37.FromyourGreenfootlessons,howdoyoucalladefinedmethod?
Callthemethodfromtheactmethod.(*)
Callthemethodfromthedefinedmethod.
WritethemethodintheWorldsuperclass.
Writethemethodintheinstance.
Writethemethodinthesourcecode.
38.FromyourGreenfootlessons,tosavespaceintheactmethod,youcanwriteanentirelynew
methodbelowit,calleda_____________.
Classmethod
Instancemethod
Definedmethod(*)
Worldmethod
Codemethod
39.WhenaGreenfootcodesegmentisexecutedinanifstatement,eachlineofcodeisexecutedin
sequentialorder.Trueorfalse?
True(*)
False
Midterm1var2

40.FromyourGreenfootlessons,whichtypeofconstructorcanbeusedtoautomatecreationof
Actorinstances?
Animal
World(*)
Actor
Vector
41.FromyourGreenfootlessons,whendoesanifelsestatementexecuteit'ssecondcodesegment?
Whenarandomnumberislessthan10.
Whenaninstanceiscreated.
Afterthefirstcodesegmentisexecuted.
Ifaconditionisfalse.(*)
Ifaconditionistrue.
42.FromyourGreenfootlessons,whichsymbolrepresentsstringconcatenation?
Symbol&
Symbol<
Symbol=
Symbol+(*)
43.HowwouldthefollowingsentencebewritteninGreenfootsourcecode?IfDuke'slegisdown,
andthekeyboardkey"d"isdown...
if(&&isDown!Greenfoot.isKeyDown("d"))
if(!isDown&&Greenfoot.isKeyDown("d"))
if(isDown&&Greenfoot.isKeyDown("d"))(*)
if(!Greenfoot.isKeyDown&&isDown("d"))
44.UseyourGreenfootknowledgetoanswerthequestion:Stringconcatenationisawaytoavoid
havingtowriteadditionalcharactersinyoursourcecode.Trueorfalse?
True(*)
False
45.InGreenfoot,whichmethodisusedtoaddanewinstancetoascenariowhentheworldis
initialized?
addClass
addWorld
addObject(*)
addInstance
46.InGreenfoot,anifstatementisusedtoalternatebetweendisplayingtwoimagesinaninstance.
Trueorfalse?
True
False(*)
47.InGreenfoot,aconstructorhasavoidreturntype.Trueorfalse?
True
False(*)
48.FromyourGreenfootlessons,aproblemstatementdefinesthepurposeforyourgame.Trueor
false?
True(*)
False
49.InGreenfoot,whattypeofparameterdoesthekeyDownmethodexpect?
String(*)
Boolean
Integer
Method
50.InGreenfoot,whichmethodchecksifakeyonthekeyboardhasbeenpressed?
keyPressmethod
keyUpmethod
keyDownmethod(*)
keyClickmethod
Midterm1var2

Das könnte Ihnen auch gefallen