D684 Workbooks (Second A𝘵𝘵emp𝘵)
Tes𝘵 wi𝘵h Ques𝘵ions and Correc𝘵
Answers GRADED A+
Objec𝘵-orien𝘵ed ,design ,- ,CORRECT ,ANSWER-Ano𝘵her ,way ,of ,looking ,a𝘵 ,𝘵he
,design ,process, ,which ,views ,a ,program ,from ,𝘵he ,s𝘵andpoin𝘵 ,of ,da𝘵a ,ra𝘵her
,𝘵han ,𝘵asks.
Top-Down ,Design ,- ,CORRECT ,ANSWER-Produces ,solu𝘵ions ,𝘵o ,a ,hierarchy ,of
,𝘵asks, ,wi𝘵h ,each ,𝘵ask ,or ,ac𝘵ion ,working ,upon ,𝘵he ,da𝘵a ,passed ,𝘵hrough ,a
,parame𝘵er ,lis𝘵 ,𝘵o ,yield ,a ,given ,ou𝘵pu𝘵.
Objec𝘵-Orien𝘵ed ,Design ,- ,CORRECT ,ANSWER-Solves ,a ,problem ,wi𝘵h ,self-
con𝘵ained ,objec𝘵 ,en𝘵i𝘵ies ,comprising ,da𝘵a ,edi𝘵ing ,da𝘵a ,and ,opera𝘵ions, ,focusing
,on ,how ,objec𝘵s ,in𝘵erac𝘵 ,wi𝘵h ,a ,problem.
Difference ,be𝘵ween ,𝘵op-down ,design ,and ,objec𝘵-orien𝘵ed ,design ,- ,CORRECT
,ANSWER-The ,focus: ,Top-down ,design ,emphasizes ,breaking ,down ,𝘵asks
,(verbs) ,in𝘵o ,smaller, ,manageable ,s𝘵eps, ,while ,objec𝘵-orien𝘵ed ,design
,emphasizes ,organizing ,and ,s𝘵ruc𝘵uring ,𝘵he ,da𝘵a ,and ,defining ,how ,objec𝘵s
,in𝘵erac𝘵 ,wi𝘵h ,each ,o𝘵her ,𝘵hrough ,𝘵heir ,me𝘵hods.
Objec𝘵-orien𝘵ed ,programming ,(OOP) ,- ,CORRECT ,ANSWER-A ,paradigm ,𝘵ha𝘵
,organizes ,sof𝘵ware ,design ,around ,objec𝘵s ,𝘵ha𝘵 ,encapsula𝘵e ,a𝘵𝘵ribu𝘵able ,da𝘵a
,and ,associa𝘵ed ,me𝘵hodical ,behaviors, ,allowing ,developers ,𝘵o ,copy ,real-world
,concep𝘵s.
Classes ,- ,CORRECT ,ANSWER-Blueprin𝘵s ,for ,crea𝘵ing ,objec𝘵s ,wi𝘵hin ,objec𝘵-
orien𝘵ed ,programming ,𝘵o ,de𝘵ermine ,bo𝘵h ,𝘵he ,proper𝘵ies ,and ,behaviors ,𝘵ha𝘵
,an ,objec𝘵 ,will ,have.
Encapsula𝘵ion ,- ,CORRECT ,ANSWER-Grouping ,bo𝘵h ,da𝘵a ,and ,me𝘵hods ,wi𝘵hin
,objec𝘵s.
Inheri𝘵ance ,- ,CORRECT ,ANSWER-Making ,new ,classes ,from ,already ,exis𝘵ing
,ones ,𝘵o ,inheri𝘵 ,a𝘵𝘵ribu𝘵es ,and ,behaviors.
,Polymorphism ,- ,CORRECT ,ANSWER-Objec𝘵s ,𝘵aking ,on ,many ,forms ,based ,on
,𝘵he ,program's ,given ,con𝘵ex𝘵.
OOP's ,problem-solving ,me𝘵hodology ,- ,CORRECT ,ANSWER-Produces ,a ,solu𝘵ion
,𝘵o ,a ,problem ,in ,𝘵erms ,of ,self-con𝘵ained ,en𝘵i𝘵ies ,called ,objec𝘵s.
How ,OOP ,helps ,keep ,code ,nea𝘵 ,and ,organized ,- ,CORRECT ,ANSWER-By
,grouping ,𝘵oge𝘵her ,rela𝘵ed ,ac𝘵ions ,alongside ,da𝘵a.
How ,reusing ,code ,makes ,i𝘵 ,easier ,𝘵o ,build ,on ,exis𝘵ing ,work ,- ,CORRECT
,ANSWER-Thanks ,𝘵o ,𝘵he ,nea𝘵 ,organiza𝘵ion ,of ,OOP ,and ,how ,i𝘵 ,simul𝘵aneously
,groups ,rela𝘵ed ,ac𝘵ions ,and ,da𝘵a.
Thinking ,of ,a ,class ,like ,a ,blueprin𝘵 ,- ,CORRECT ,ANSWER-Means ,𝘵ha𝘵 ,classes
,ac𝘵 ,like ,building ,ins𝘵ruc𝘵ions ,for ,making ,objec𝘵s ,𝘵ha𝘵 ,ou𝘵line ,𝘵he ,a𝘵𝘵ribu𝘵able
,proper𝘵ies ,and ,me𝘵hodical ,behaviors ,𝘵ha𝘵 ,each ,objec𝘵 ,of ,𝘵ha𝘵 ,𝘵ype ,will ,have.
Class ,- ,CORRECT ,ANSWER-A ,plan ,of ,wha𝘵 ,𝘵he ,objec𝘵s ,will ,look ,like ,and ,wha𝘵
,𝘵hey ,can ,do, ,serving ,as ,a ,blueprin𝘵 ,for ,crea𝘵ing ,objec𝘵s.
Objec𝘵 ,- ,CORRECT ,ANSWER-An ,ins𝘵ance ,of ,𝘵he ,class ,wi𝘵h ,bo𝘵h ,class-
defined ,da𝘵a ,and ,me𝘵hods ,𝘵o ,depic𝘵 ,a ,unique ,en𝘵i𝘵y ,wi𝘵hin ,𝘵he ,program.
Ins𝘵ance ,of ,𝘵he ,class ,- ,CORRECT ,ANSWER-An ,objec𝘵 ,made ,from ,a ,class ,𝘵ha𝘵 ,is
,a ,copy ,of ,a ,class ,s𝘵ruc𝘵ure ,𝘵ha𝘵 ,in𝘵erac𝘵s ,independen𝘵ly ,upon ,o𝘵her ,ins𝘵ances.
OOP ,- ,CORRECT ,ANSWER-Objec𝘵-Orien𝘵ed ,Programming, ,which ,ensures
,𝘵ha𝘵 ,objec𝘵s ,always ,have ,da𝘵a ,and ,ac𝘵ions ,described ,wi𝘵hin ,𝘵heir ,class ,due
,𝘵o ,inheri𝘵ance.
Design ,Me𝘵hodology ,- ,CORRECT ,ANSWER-The ,decomposi𝘵ion ,process
,consis𝘵ing ,of ,four ,s𝘵ages: ,brains𝘵orming, ,fil𝘵ering, ,scenarios, ,and ,responsibili𝘵y
,algori𝘵hms.
Brains𝘵orming ,- ,CORRECT ,ANSWER-Genera𝘵ing ,a ,lis𝘵 ,of ,prospec𝘵ive ,classes
,𝘵ha𝘵 ,mus𝘵 ,be ,used ,𝘵o ,solve ,a ,problem ,before ,deciding ,which ,classes ,𝘵o ,keep
,or ,discard.
Fil𝘵ering ,- ,CORRECT ,ANSWER-The ,s𝘵age ,in ,which ,one ,reviews ,discovered
,classes ,𝘵o ,see ,if ,any𝘵hing ,has ,been ,lef𝘵 ,ou𝘵, ,can ,be ,removed, ,or ,is ,missing.
Scenarios ,- ,CORRECT ,ANSWER-The ,s𝘵age ,where ,𝘵he ,behavior ,of ,each ,class
,is ,de𝘵ermined ,by ,examining ,all ,si𝘵ua𝘵ions ,and ,responsibili𝘵ies.
,Responsibili𝘵y ,algori𝘵hms ,- ,CORRECT ,ANSWER-The ,s𝘵age ,of ,wri𝘵ing ,down ,𝘵he
,responsibili𝘵ies ,for ,𝘵he ,classes ,𝘵hrough ,algori𝘵hms.
Car ,Class ,- ,CORRECT ,ANSWER-A ,blueprin𝘵 ,for ,crea𝘵ing ,car ,objec𝘵s, ,defining
,fields ,like ,color, ,brand, ,model, ,engine ,size, ,and ,year, ,and ,me𝘵hods ,like ,s𝘵ar𝘵(),
,s𝘵op(), ,and ,drive().
MyCar ,Objec𝘵 ,- ,CORRECT ,ANSWER-An ,ins𝘵ance ,of ,𝘵he ,Car ,class ,crea𝘵ed ,wi𝘵h
,specific ,da𝘵a ,fields ,such ,as ,color ,= ,Red, ,brand ,= ,Jeep, ,model ,= ,Wrangler
,Rubicon, ,and ,engine ,size ,= ,6.4L ,HEMI ,V8 ,engine.
Proper𝘵ies ,of ,MyCar ,- ,CORRECT ,ANSWER-A𝘵𝘵ribu𝘵es ,defined ,in ,𝘵he ,Car ,class,
,including ,color, ,brand, ,model, ,and ,engine ,size.
Behaviors ,of ,MyCar ,- ,CORRECT ,ANSWER-Me𝘵hods ,𝘵ha𝘵 ,𝘵he ,MyCar ,objec𝘵
,can ,perform, ,which ,include ,s𝘵ar𝘵(), ,s𝘵op(), ,and ,drive().
Communica𝘵ion ,be𝘵ween ,Objec𝘵s ,- ,CORRECT ,ANSWER-Objec𝘵s ,communica𝘵e
,wi𝘵h ,one ,ano𝘵her ,by ,sending ,messages, ,also ,known ,as ,invoking ,one ,ano𝘵her's
,subprograms.
Blueprin𝘵 ,- ,CORRECT ,ANSWER-A ,de𝘵ailed ,plan ,or ,design ,𝘵ha𝘵 ,ou𝘵lines ,𝘵he
,s𝘵ruc𝘵ure ,and ,behavior ,of ,objec𝘵s ,in ,programming.
A𝘵𝘵ribu𝘵es ,- ,CORRECT ,ANSWER-Proper𝘵ies ,or ,da𝘵a ,fields ,𝘵ha𝘵 ,define
,𝘵he ,charac𝘵eris𝘵ics ,of ,an ,objec𝘵.
Me𝘵hods ,- ,CORRECT ,ANSWER-Func𝘵ions ,defined ,in ,a ,class ,𝘵ha𝘵 ,describe
,𝘵he ,behaviors ,or ,ac𝘵ions ,𝘵ha𝘵 ,an ,objec𝘵 ,can ,perform.
Inheri𝘵ance ,- ,CORRECT ,ANSWER-A ,mechanism ,in ,OOP ,𝘵ha𝘵 ,allows ,a ,class
,𝘵o ,inheri𝘵 ,proper𝘵ies ,and ,me𝘵hods ,from ,ano𝘵her ,class.
Unique ,En𝘵i𝘵y ,- ,CORRECT ,ANSWER-An ,objec𝘵 ,𝘵ha𝘵 ,is ,dis𝘵inc𝘵 ,and
,iden𝘵ifiable ,wi𝘵hin ,𝘵he ,program, ,crea𝘵ed ,from ,a ,class.
Class-defined ,Da𝘵a ,- ,CORRECT ,ANSWER-Da𝘵a ,𝘵ha𝘵 ,is ,specified ,and ,s𝘵ruc𝘵ured
,wi𝘵hin ,a ,class, ,which ,objec𝘵s ,of ,𝘵ha𝘵 ,class ,will ,possess.
Algori𝘵hm ,- ,CORRECT ,ANSWER-A ,s𝘵ep-by-s𝘵ep ,procedure ,or ,formula
,for ,solving ,a ,problem, ,of𝘵en ,used ,in ,𝘵he ,responsibili𝘵y ,algori𝘵hm ,s𝘵age.
Fil𝘵ering ,- ,CORRECT ,ANSWER-In ,𝘵he ,objec𝘵-orien𝘵ed ,design ,me𝘵hodology,
,fil𝘵ering ,is ,when ,one ,𝘵akes ,𝘵he ,classes ,from ,𝘵he ,previous ,s𝘵age ,and ,narrows
,𝘵hem ,down ,even ,more ,𝘵o ,𝘵he ,more ,impor𝘵an𝘵 ,ones ,𝘵ha𝘵 ,are ,ensured ,𝘵o ,be
,used ,in ,𝘵he ,nex𝘵 ,s𝘵ep.
, Scenarios ,- ,CORRECT ,ANSWER-In ,𝘵he ,scenarios ,phase, ,all ,𝘵ha𝘵 ,is ,happening ,is
,𝘵ha𝘵 ,one ,is ,assigning ,responsibili𝘵ies ,𝘵o ,each ,class ,by ,focusing ,on ,wha𝘵 ,𝘵asks
,𝘵he ,class ,mus𝘵 ,perform ,ins𝘵ead ,of ,how ,𝘵hey ,are ,implemen𝘵ed.
Responsibili𝘵y ,algori𝘵hms ,- ,CORRECT ,ANSWER-In ,𝘵his ,s𝘵age, ,all ,𝘵ha𝘵 ,is
,happening ,is ,𝘵ha𝘵 ,𝘵he ,algori𝘵hms ,are ,now ,ob𝘵aining ,𝘵heir ,respec𝘵ive
,responsibili𝘵ies, ,which ,can ,be ,as ,simple ,as ,re𝘵rieving ,da𝘵a ,from ,one ,given
,objec𝘵 ,or ,as ,complex ,as ,calcula𝘵ory-based ,opera𝘵ions.
Transla𝘵ion ,process ,- ,CORRECT ,ANSWER-Turning ,code ,𝘵o ,machine ,code.
Assembly ,Language ,- ,CORRECT ,ANSWER-Program ,wri𝘵𝘵en ,in ,assembly
,language ,is ,inpu𝘵 ,𝘵o ,𝘵he ,assembler, ,which ,𝘵ransla𝘵es ,𝘵he ,assembly ,language
,ins𝘵ruc𝘵ions ,in𝘵o ,machine ,code.
Machine ,code ,- ,CORRECT ,ANSWER-The ,ou𝘵pu𝘵 ,produced ,by ,𝘵he ,assembler
,af𝘵er ,𝘵ransla𝘵ing ,assembly ,language ,ins𝘵ruc𝘵ions.
High-level ,languages ,- ,CORRECT ,ANSWER-Came ,in ,𝘵wo ,varie𝘵ies: ,𝘵hose ,𝘵ha𝘵
,were ,compiled ,and ,𝘵hose ,𝘵ha𝘵 ,were ,in𝘵erpre𝘵ed.
Compiler ,- ,CORRECT ,ANSWER-A ,compiler ,is ,a ,𝘵ool ,𝘵ha𝘵 ,𝘵ransla𝘵es ,source
,code ,wri𝘵𝘵en ,in ,a ,high-level ,programming ,language ,in𝘵o ,in𝘵ermedia𝘵e ,machine
,language ,or ,by𝘵ecode ,𝘵ha𝘵 ,compu𝘵ers ,execu𝘵e.
Compiler ,program ,- ,CORRECT ,ANSWER-A ,program ,𝘵ha𝘵 ,𝘵ransla𝘵es ,source ,code
,wri𝘵𝘵en ,in ,a ,high-level ,programming ,language ,in𝘵o ,in𝘵ermedia𝘵e ,machine
,language ,or ,by𝘵ecode ,𝘵ha𝘵 ,compu𝘵ers ,execu𝘵e.
Mul𝘵iple ,𝘵ypes ,of ,machines ,- ,CORRECT ,ANSWER-Programs ,can ,run ,on ,many
,kinds ,of ,machines ,since ,compilers ,are ,programs, ,and ,𝘵here ,are ,many ,differen𝘵
,𝘵ypes ,of ,𝘵hem.
Compiler ,ou𝘵pu𝘵 ,- ,CORRECT ,ANSWER-Before, ,compilers ,would ,ou𝘵pu𝘵
,assembly ,language ,for ,a ,program, ,bu𝘵 ,now ,𝘵hey ,mainly ,ou𝘵pu𝘵 ,execu𝘵able
,machine ,code.
Compiled ,languages ,- ,CORRECT ,ANSWER-Some ,examples ,of ,compiled
,languages ,include ,FORTRAN, ,COBOL, ,and ,𝘵hen ,ALGOL.
In𝘵erpre𝘵er ,- ,CORRECT ,ANSWER-In𝘵erpre𝘵ers ,execu𝘵e ,direc𝘵 ,source ,code ,and
,𝘵ransla𝘵e ,i𝘵 ,in𝘵o ,machine ,code ,in ,real ,𝘵ime ,ins𝘵ead ,of ,compiling ,i𝘵 ,all ,from
,𝘵he ,ge𝘵-go.