AP Computer Science A questions with
complete solution 2024
accessor jmethod j- jANS✓✓-a jmethod jthat jaccesses jan jobject jbut jdoes jnot
jchange jit
actual jparameter j- jthe jexpression jsupplied jfor ja jformal jparameter jof ja
jmethod jby jthe jcaller
address j- jANS✓✓-a jlocation jin jmemory jat jwhich ja jbinary jnumber j(usually
ja jbyte, jor jvalue jof j8 jbits) jis jstored. jThe jlocation jin jmemory jcan jitself jbe
jidentified jby ja jbinary jnumber j- jthis jnumber, jthe jabsolute jor jexplicit
jaddress, jgives jthe jabsolute jlocation jof jthe jaddress jin jmemory, jwhile ja
jrelative jaddress jspecifies ja jlocation jmemory j(some jother jaddress jonly jin
jrelation jto jthe jcurrent, jor jbase, jaddress. jAll jaccess jto jmemory jis jaccess
jto jto ja jcell jof jmemory jfound jat ja jspecified jaddress.
algorithm j- jANS✓✓-a jwell-ordered jcollection jof junambiguous jand jeffectively
jcomputable joperations jthat, jwhen jexecuted, jproduces ja jresult jand jhalts jin
ja jfinite jamount jof jtime
[[an junambiguous, jexecutable, jand jterminating jspecification jof ja jway jto
jsolve ja jproblem
argument j- jANS✓✓-an jactual jparameter jin ja jmethod jcall, jor jone jof jthe
jvalues jcombined jby jan joperator]]
arithmetic/Logic jUnit j(ALU)
ASCII j- jANS✓✓-The jAmerican jStandard jCode jfor jInformation jExchange j- ja
jcharacter-encoding jscheme jbased jon jthe jEnglish jalphabet jused jto
jrepresent jtext jin jcomputers. jIt juses j8 jbits jto jrepresent jeach jcharacter, jso
jit jis jable jto jencode ja jtotal jof j2^8 j= j256 jdifferent jcharacters. jThese jare
jassigned jthe jinteger jvalues j0 jto j255. jOnly j32 jto j126 jhave jbeen jassigned
jto jprintable jcharacters. jThe jASCII jhas jbeen jlargely jsupplanted jby
jUNICODE jand jthe jUCS j(universal jcharacter jset), jwhich jare jbackwards
jcompatible jwith jit j(commonly jencoded jusing jUTF-8, jUTF-16, jand jUTF-32
jrepresenting jcharacter jsets jusing j8, j16, jand j32 jbits jrespectively. jUTF-16
jcan jrepresent j65,536 jcharacters.)
binary j- jANS✓✓-the jbinary, jor jthe jbase-2, jpositional jnumbering jsystem
jrepresents jnumerical jvalues jusing jonly jtwo jsymbols, j0 jand j1
, bit j- jANS✓✓-a jcontraction jof jbinary jdigit; jthe jsmallest junit jof jinformation,
jhaving jtwo jpossible jvalues: j0 jand j1. jA jdata jelement jconsisting jof jn jbits
jhas j2ⁿ jpossible
boolean j- jANS✓✓-a jdata jtype jwith jtwo jpossible jvalue jrepresenting jtrue
jand jfalse.
boolean jexpression j- jANS✓✓-an jexpression jin ja jprogramming jlanguage
jthat jproduces ja jboolean jvalue jwhen jevaluated, ji.e., jtrue jor jfalse
boolean joperator j- jANS✓✓-an joperator jthat jcan jbe japplied jto jBoolean
jvalues. jJava jhas j3 jboolean, jor jlogical, joperators: j&&, j||, jand j!.
byte j- jANS✓✓-a jnumber jmade jup jof j8 jbits. jEssentially, jall jcurrently
jmanufactured jcomputers juse ja jbyte jas jthe jsmallest junit jof jstorage jin
jmemory
cache jmemory j- jANS✓✓-a jspecial, jsuper-high-speed jmemory junit. jOperating
jon jthe jprinciple jof jlocality, jwhich jsays jthat jwhen jthe jcomputer juses
jsomething jit jwill jprobably juse jit jagain jvery jsoon, jwhen jthe jcomputer
jreferences ja jpiece jof jdata jfor jthe jfirst jtime, jit jstores jthat jdata jin jcache
jmemory, jand jwhen jit jneeds jto jfetch ja jpiece jof jinformation, jit jfirst jlooks
jin jcache jmemory jbefore jperforming ja jmemory jfetch. jSince jaccessing
jcache jmemory jis jso jmuch jfaster j(typically j5 jto j10 jtimes jfaster) jthan
jaccessing jRAM, jit jis jstill jfaster jto jaccess jcache jmemory jfirst jand jthen
jlook jin jRAM jif jthe jdata jis jnot jfound j(the jcache jhit jrate jtells jus jjust jhow
jmuch jfaster).
cast j- jANS✓✓-Explicitly jconverting ja jvalue jfrom jone jtype jto ja jdifferent
jtype
class j- jANS✓✓-a jprogrammer jdefined jdata jtype, jmay jbe ja jblueprint jor
jtemplate jfor jcreating jan jobject
computer j- jANS✓✓-the jstudy jof jalgorithms, jincluding jtheir jformal jand
jmathematical jproperties, jtheir jhardware jrealizations, jtheir jlinguistic
jrealizations, jand jtheir japplications
constructor j- jANS✓✓-A jset jof jstatements jfor jinitializing ja jnewly
jinstantiated jvariable
control junit j- jANS✓✓-Unit jwithin jthe jcomputer jthat jactually jcarries jout jthe
joperations jof ja jprogram. jthe jcontrol junit jdoes jthree jthings: jfetches jfrom
jmemory jthe jnext jinstruction jto jbe jexecuted, jdecodes jit, jand jexecutes jit
complete solution 2024
accessor jmethod j- jANS✓✓-a jmethod jthat jaccesses jan jobject jbut jdoes jnot
jchange jit
actual jparameter j- jthe jexpression jsupplied jfor ja jformal jparameter jof ja
jmethod jby jthe jcaller
address j- jANS✓✓-a jlocation jin jmemory jat jwhich ja jbinary jnumber j(usually
ja jbyte, jor jvalue jof j8 jbits) jis jstored. jThe jlocation jin jmemory jcan jitself jbe
jidentified jby ja jbinary jnumber j- jthis jnumber, jthe jabsolute jor jexplicit
jaddress, jgives jthe jabsolute jlocation jof jthe jaddress jin jmemory, jwhile ja
jrelative jaddress jspecifies ja jlocation jmemory j(some jother jaddress jonly jin
jrelation jto jthe jcurrent, jor jbase, jaddress. jAll jaccess jto jmemory jis jaccess
jto jto ja jcell jof jmemory jfound jat ja jspecified jaddress.
algorithm j- jANS✓✓-a jwell-ordered jcollection jof junambiguous jand jeffectively
jcomputable joperations jthat, jwhen jexecuted, jproduces ja jresult jand jhalts jin
ja jfinite jamount jof jtime
[[an junambiguous, jexecutable, jand jterminating jspecification jof ja jway jto
jsolve ja jproblem
argument j- jANS✓✓-an jactual jparameter jin ja jmethod jcall, jor jone jof jthe
jvalues jcombined jby jan joperator]]
arithmetic/Logic jUnit j(ALU)
ASCII j- jANS✓✓-The jAmerican jStandard jCode jfor jInformation jExchange j- ja
jcharacter-encoding jscheme jbased jon jthe jEnglish jalphabet jused jto
jrepresent jtext jin jcomputers. jIt juses j8 jbits jto jrepresent jeach jcharacter, jso
jit jis jable jto jencode ja jtotal jof j2^8 j= j256 jdifferent jcharacters. jThese jare
jassigned jthe jinteger jvalues j0 jto j255. jOnly j32 jto j126 jhave jbeen jassigned
jto jprintable jcharacters. jThe jASCII jhas jbeen jlargely jsupplanted jby
jUNICODE jand jthe jUCS j(universal jcharacter jset), jwhich jare jbackwards
jcompatible jwith jit j(commonly jencoded jusing jUTF-8, jUTF-16, jand jUTF-32
jrepresenting jcharacter jsets jusing j8, j16, jand j32 jbits jrespectively. jUTF-16
jcan jrepresent j65,536 jcharacters.)
binary j- jANS✓✓-the jbinary, jor jthe jbase-2, jpositional jnumbering jsystem
jrepresents jnumerical jvalues jusing jonly jtwo jsymbols, j0 jand j1
, bit j- jANS✓✓-a jcontraction jof jbinary jdigit; jthe jsmallest junit jof jinformation,
jhaving jtwo jpossible jvalues: j0 jand j1. jA jdata jelement jconsisting jof jn jbits
jhas j2ⁿ jpossible
boolean j- jANS✓✓-a jdata jtype jwith jtwo jpossible jvalue jrepresenting jtrue
jand jfalse.
boolean jexpression j- jANS✓✓-an jexpression jin ja jprogramming jlanguage
jthat jproduces ja jboolean jvalue jwhen jevaluated, ji.e., jtrue jor jfalse
boolean joperator j- jANS✓✓-an joperator jthat jcan jbe japplied jto jBoolean
jvalues. jJava jhas j3 jboolean, jor jlogical, joperators: j&&, j||, jand j!.
byte j- jANS✓✓-a jnumber jmade jup jof j8 jbits. jEssentially, jall jcurrently
jmanufactured jcomputers juse ja jbyte jas jthe jsmallest junit jof jstorage jin
jmemory
cache jmemory j- jANS✓✓-a jspecial, jsuper-high-speed jmemory junit. jOperating
jon jthe jprinciple jof jlocality, jwhich jsays jthat jwhen jthe jcomputer juses
jsomething jit jwill jprobably juse jit jagain jvery jsoon, jwhen jthe jcomputer
jreferences ja jpiece jof jdata jfor jthe jfirst jtime, jit jstores jthat jdata jin jcache
jmemory, jand jwhen jit jneeds jto jfetch ja jpiece jof jinformation, jit jfirst jlooks
jin jcache jmemory jbefore jperforming ja jmemory jfetch. jSince jaccessing
jcache jmemory jis jso jmuch jfaster j(typically j5 jto j10 jtimes jfaster) jthan
jaccessing jRAM, jit jis jstill jfaster jto jaccess jcache jmemory jfirst jand jthen
jlook jin jRAM jif jthe jdata jis jnot jfound j(the jcache jhit jrate jtells jus jjust jhow
jmuch jfaster).
cast j- jANS✓✓-Explicitly jconverting ja jvalue jfrom jone jtype jto ja jdifferent
jtype
class j- jANS✓✓-a jprogrammer jdefined jdata jtype, jmay jbe ja jblueprint jor
jtemplate jfor jcreating jan jobject
computer j- jANS✓✓-the jstudy jof jalgorithms, jincluding jtheir jformal jand
jmathematical jproperties, jtheir jhardware jrealizations, jtheir jlinguistic
jrealizations, jand jtheir japplications
constructor j- jANS✓✓-A jset jof jstatements jfor jinitializing ja jnewly
jinstantiated jvariable
control junit j- jANS✓✓-Unit jwithin jthe jcomputer jthat jactually jcarries jout jthe
joperations jof ja jprogram. jthe jcontrol junit jdoes jthree jthings: jfetches jfrom
jmemory jthe jnext jinstruction jto jbe jexecuted, jdecodes jit, jand jexecutes jit