Sunteți pe pagina 1din 9

12/4/2016

Chapter1QuizANSWERS

Chapter1QuizAnswers
1.Aprogramwritteninobjectorientedstyleconsistsofinteractingobjects.
Yourresponse:B.False
Incorrect.
ThecorrectanswerisTrue.
Seesection1.1inyourtextbook.

2.Tocreateobjectsonemustdefineaclassfirst.
Yourresponse:B.False
Incorrect.
ThecorrectanswerisTrue.
Seesection1.1inyourtextbook.

3.Anobjectisalsocalledaninstanceofaclass.
Yourresponse:B.False
Incorrect.
ThecorrectanswerisTrue.
Seesection1.1inyourtextbook.

4.ThefollowingdiagramshowsaCustomerobjectnamedjohn.

http://www.mhhe.com/cgibin/netgrader.pl

1/9

12/4/2016

Chapter1QuizANSWERS

Yourresponse:B.False
Correct!

5.ThefollowingdiagramshowstheCustomerclass.

Yourresponse:A.True
Incorrect.
ThecorrectanswerisFalse.
Arectangleisusedfortheclassicon.

Seesection1.1inyourtextbook.

6.Therearetwotypesofmethods.Thefirstisaclassmethod,andthesecondisaninstancemethod.
Yourresponse:B.False
Incorrect.
ThecorrectanswerisTrue.
Seesection1.2inyourtextbook.

7.Amethodmustalwaysreturnavalue.
http://www.mhhe.com/cgibin/netgrader.pl

2/9

12/4/2016

Chapter1QuizANSWERS

Yourresponse:B.False
Correct!

8.Theuseofaclassdatavalueeliminatestheredundantandwastefulduplicationofdatavalue.
Yourresponse:B.False
Incorrect.
ThecorrectanswerisTrue.
Seesection1.3inyourtextbook.

9.Adatavalueofanobjectcannotbechangedoncethevalueisassigned.
Yourresponse:B.False
Correct!

10.Aninheritanceisamechanismtoassociateoneobjecttomultipleclasses.
Yourresponse:B.False
Correct!

11.Asubclasscanitselfbeasuperclassofotherclasses,thusforminganinheritancehierarchy.
Yourresponse:B.False
Incorrect.

http://www.mhhe.com/cgibin/netgrader.pl

3/9

12/4/2016

Chapter1QuizANSWERS

ThecorrectanswerisTrue.
Seesection1.4inyourtextbook.

12.Asubclasscaninheritonlyaportionofitssuperclass.
Yourresponse:B.False
Correct!

13.IfclassAinheritsfromclassB,thenBisanancestorofA.
Yourresponse:B.False
Correct!

14.Thesequenceofstagesfromconceptiontooperationofaprogramiscalledthesoftware
generation.
Yourresponse:B.False
Correct!

15.Broadlyspeaking,thesoftwarelifecycleincludestheanalysis,design,coding,testing,and
operationphases.
Yourresponse:B.False
Incorrect.
ThecorrectanswerisTrue.
Seesection1.5inyourtextbook.

http://www.mhhe.com/cgibin/netgrader.pl

4/9

12/4/2016

Chapter1QuizANSWERS

16.ThefollowingJavastatementmakesaSketchPadobjectnameddoodleBoardappearonthe
screen.
doodleBoard=newSketchPad()
Yourresponse:A.True
Incorrect.
ThecorrectanswerisFalse.
Youneedoneadditionalstatementtomaketheobjectvisibleonthescreen:
doodleBoard.setVisible(true)
ThecorrectanswerisTrue.
Seesection1.6inyourtextbook.

17.Whichofthefollowingmostlikelyisanobjectinsteadaclass?
Yourresponse:B.Person
Incorrect.
ThecorrectanswerisC.
Yourchoiceswere:
A.Account
B.Person
C.Howard
D.Vehicle
Seesection1.1inyourtextbook.

18.IfmoniqueisaCustomerobject,thenwhichofthefollowingobjectdiagramsiscorrect?

Yourresponse:A.

Incorrect.
ThecorrectanswerisC.
http://www.mhhe.com/cgibin/netgrader.pl

5/9

12/4/2016

Chapter1QuizANSWERS

Yourchoiceswere:

A.

B.

C.

D.

Seesection1.1inyourtextbook.

19.Whichofthefollowingdiagramillustratesthepassingofanargumenttoamethod?

Yourresponse:A.

Correct!

http://www.mhhe.com/cgibin/netgrader.pl

6/9

12/4/2016

Chapter1QuizANSWERS

20.Whenaninstancedatavalueisdefinedforaclass,whichofthefollowingisfalse?
Yourresponse:C.Ifthedefineddatavalueisdesignatedasavariable,thenthevaluecan
changeovertime.
Incorrect.
ThecorrectanswerisD.
Yourchoiceswere:
A.Allinstancesoftheclasswillhavethedefinedinstancedatavalue.
B.Theactualvalueforthedefinedinstancedatavaluecandifferforindividualinstances.
C.Ifthedefineddatavalueisdesignatedasavariable,thenthevaluecanchangeovertime.
D.Thereisonecopyofthedefineddatavaluethatwillbesharedbyallinstancesoftheclass.
Seesection1.3inyourtextbook.

21.Whatwillbetheconsequence(s)iftheclassdatavalueisnotallowed?
Yourresponse:A.Onlytheinstancesoftheclasscanhavedatavalues.
Incorrect.
ThecorrectanswerisD.
Yourchoiceswere:
A.Onlytheinstancesoftheclasscanhavedatavalues.
B.Anyinformationthatneedstobesharedamongtheinstancesmustbeduplicatedinindividual
instances.
C.Anycollectiveinformationabouttheinstancesoftheclasscannotbestoredwithintheclass.
D.Alloftheabove.
Seesection1.3inyourtextbook.

22.Whichofthefollowingstatementistrue?
Yourresponse:C.Asubclasscaninheritfrommorethanonesuperclass.
Incorrect.
ThecorrectanswerisD.
Yourchoiceswere:
A.Asuperclasscanbedefinedfromtheexistingsubclasses.
B.Asubclasscaninheritonlyaportionofitssuperclass.
C.Asubclasscaninheritfrommorethanonesuperclass.
D.Asuperclassisanancestorofitssubclasses.
Seesection1.4inyourtextbook.

http://www.mhhe.com/cgibin/netgrader.pl

7/9

12/4/2016

Chapter1QuizANSWERS

23.IftheclassesVehicle,Truck,andMotorcyclearetoberelatedviainheritance,thenwhichofthe
followingrelationshipisthemostappropriate?
Yourresponse:A.

Incorrect.
ThecorrectanswerisD.
Yourchoiceswere:
A.
B.
C.
D.
Seesection1.4inyourtextbook.

24.Applyingasystematicanddisciplinedapproachtothedevelopment,testing,andmaintenanceofa
programiscalled
Yourresponse:A.Softwarelifecycle
Incorrect.
ThecorrectanswerisC.
Yourchoiceswere:
A.Softwarelifecycle
B.Softwareconstruction
C.Softwareengineering
D.Softwareoperation
Seesection1.4inyourtextbook.

25.Activitytoeliminateprogrammingerroriscalled
Yourresponse:C.Testing
Incorrect.
ThecorrectanswerisB.
Yourchoiceswere:
A.Debunking
http://www.mhhe.com/cgibin/netgrader.pl

8/9

12/4/2016

Chapter1QuizANSWERS

B.Debugging
C.Testing
D.Eradicating
Seesection1.5inyourtextbook.

26.Thefirststageofthesoftwarelifecycleis
Yourresponse:A.Design
Incorrect.
ThecorrectanswerisD.
Yourchoiceswere:
A.Design
B.Testing
C.Maintenance
D.Analysis
Seesection1.5inyourtextbook.

YourScore:
Correctlyanswered8outof26totalquestionsor30.8%correct.

http://www.mhhe.com/cgibin/netgrader.pl

9/9

S-ar putea să vă placă și