ࡱ> UWT` jbjb $&|c|cu8 4448l x$ h,b R"  "D, G4l80h,##   $  Final Review The final is comprehensive. It will be similar to the midterms, but with more of a big-picture focus. This review focuses on newer concepts and the Java language, but Python is fair game, so review that language. Ways to study: Practice answering midterm questions without notes. Practice answering questions on old and new worksheets Practice coding from scratch Look over code samples on-line and handed-out in class. Come in and discuss problems with Wolber Study with classmates. Newer Concepts Object-oriented methods and data access Built-in Java arrays Building an ArrayList-like library class using arrays and class object. Iterating with for loops and iterators Class object and inheritance Information hiding Static methods and variables Parsing and Lexical Analysis Web Development On-going Concepts Programming terminology Tracing Comparing Python and Java Study Questions Information Hiding Why does Java provide information hiding? What does private mean? Can you write code that will cause a visibility error? Why are data members, by convention, not defined as public? Give an example of an appropriate private method from your projects. Static methods and data How do you access a static method/data? Give an example of an appropriate static data member from your projects? Dynamic Web Pages What is a dynamic web page? Draw a diagram showing the steps between a user entering a url and the system responding with a dynamic web page. What is the purpose of CSS?l What is lexical analysis? What is the job of a parser? Can you write code to identify various patterns of text? Anatomy of a program: Be able to define and identify terms: data member field local variable global variable formal parameter actual parameter function signature method instance variable static constructor subclass parent descendent ancestor Can you explain the main method header that was so weird looking when we began? Strings How is Java's String class different than other classes? What special things can you do to one? How is accessing the characters of a string different in Python and Java? Lists and Iteration What list constructs does Python provide? What about Java? What is an iterator? How does a 'for loop' work? What are the steps in creating a built-in array of objects, such as Cars? How does the library class ArrayList make use of the library class Object? What is the difference between the built-in Java array and Java ArrayList? How is ArrayList implemented? What is the advantage of using ArrayList? What is the class 'Object' in Java? How is it useful for code reuse? Why does Wolber call it the grand pupa? If a formal parameter is of type Object, what must the actual parameter be? How is a Matrix represented in Python? What would a class Matrix look like? Sometimes loops are not just 1..10 or walking through a list, but instead end based on an arbitrary expression. What are some examples of this from your projects? Types What is a type? What is a strongly-typed language? What are the advantages of a strongly typed language? In Java, there is a clear distinction between scalar types and objects. How does this complicate things in terms of using class ArrayList? Object-Oriented Programming What is a class? What is an object? What is an object reference? What are the components of a class? What are the typical bookkeeping methods in a class? How is Python different than Java in terms of how object-oriented programming works? What is a constructor? When is it called? Tracing Programs What is the heap? What occurs in a trace for the following: a. object creation statement b. method call For the following types of actual parameters, what is actually sent to a method and put in the 'box' of the formal parameter: a. scalar b. list in Python c. Java array d. Java Object What is a variable? What is the value of a variable that is of an object type? Beneath the Hood-- Bits and Bytes What is a byte? What is a bit? How big is an integer? How big is a character? How big is an object reference? Convert a stream of bits into an integer, and vice-a-versa. How big an integer can be stored in n bits? How much memory can a program use? CS 110: Introduction to Computer Science Spring 2008  `a  8 J b A ] s iqrsĺğĺ̂{܂ h,h_h_h9Mh_5CJOJQJh_h_B*ph h_h_h9Mh_CJOJQJ h9Mh_h9Mh_56h9Mh_6h_h_56CJOJQJ!h$(h_B*CJOJQJph$h9Mh_5B*CJ OJQJph )`a~  23HI & Fgd_ & Fgd_gd_gd_$a$gd_u ' ( 8 J b j / A ] s P gd_gd_gd_ Sgi"W#gd_gd_#@OUwqrstugd_gd_^gd_":p_/ =!"#$%<@< NormalCJaJmH sH tH T@T #t Heading 1$<@&5CJ KH OJQJaJ R@R #t Heading 2$<@&56CJOJQJaJDA@D Default Paragraph FontRi@R  Table Normal4 l4a (k@(No List4@4 #tHeader  !4 @4 #tFooter  !F^`F _ Normal (Web)dd[$\$_H& !z z z z8" *5 )`a~  23HI  '(8Jbj/A]sP Sg i   " W #@OUwqrstu0u0P0u0 0u 0u0)Cu 0)Cu0)Cu 0)Cu0)Cu 0)Cu0)Cu 0)Cu0>Cu00000000000000000000000000000000000000000000000@000000000000000000000000000000000 00{D )`a~ 23HI  '(8Jbj/A]P Sg i  " W #@OUwqrst0Ā0Ā0Ā0Ā 0Ā 0Ā0CCĀ 0CCĀ0CCĀ 0CCĀ0CCĀ 0CCĀ0CCĀ 0CCĀ0CCĀ0! 8@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw0E0i0E0i0E0i0E0i0E0i0E0i0E0i0E0i08@Nw0:@Nw0:@Nw08@Nw08@Nw08@Nw08@Nw0:@Nw0:@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw0:@Nw08@Nw08@Nw0:@Nw0:@Nw08@Nw08@Nw0:@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw0:@Nw08@Nw08@Nw08@Nw08@Nw0:@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@Nw08@N0@77777:  #U^!9 B K Q u(" s t g } "&,CIu:::::::::::: 9^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH. 9         @ PJ  # @UnknownGTimes New Roman5Symbol3 ArialC Lucida Grande 1h:f:f6 !4d|@XPMacintosh HD:Applications:Microsoft Office 2004:Templates:My Templates:cs110.dotLinux TutorialUSF ITSUSF ITS  Oh+'0PK  , 8 D P\dlt|'Linux TutorialiITUSF ITSSF  cs110.dotriUSF ITS5F Microsoft Word 11.1@zT@@S@z_i@>7p6 GIPICTId ,, MSWD ,@Times New Roman@ 2.(w CS 110: I- Q)n-\)t-) r-)o-)duc-)Ht-`)i-)o- Q)n -)&t-\)o- Q) -) C-)!o-`)m-)'pu-)2t-)e-)r-) Sc-`)?i-)e- Q)n-)ce!-  ), -). (Spr-`)Fi- Q)n-)g-) -) 2008-\)d  B-(l%F->)&i-)n->)+a-)(l-@) -)Re->)Uv-)(iew-)u  6-(w ,@Times New Roman@ 2-*kT- Q)h-)e-) -`) fi- Q)n-)a- Q)l-)  -`) i-)s-\) -) c-)o-`)m-)'pre- Q)@h-)e- Q)n-)s-`)i- Q)v-)e.-\)# -) I-)t-) w-`)1il- Q)l-\)  - Q) b-)e-) -) s-`)imil-)Qa-)r-) -) to t-)Ahe- Q). -`) mi-)5d-)t-)er-`)'m-)'s,-\)  - Q) b-)ut -)3w-`)$i-)t-)h- Q) -`) m-)'o-)r-)e-) -) o-`)f- Q) -) a - Q)"b-`)*i-)g-)--(Twp-`)i-)c-)t-)ure- Q)@-) -`) f-)o-)cus-)B.-)  T- Q),h-`)i-)s-@ ) -) re- Q)'v-`)i-)ew-\): -`) f-)o-)cuses- Q)k -) o- Q)n n-)?ewer-)a -) c-)o- Q)n-)c-)ep-)/t-)s- Q) -) a- Q)n-)d-) t- Q)h-)e-) -) Ja- Q))v-)a-) -`) l-)a- Q)n-)guage,-) - Q) b-)u-\)t-)  P-`))y-)t- Q)h-)o- Q)n-) -`(wi-)s-\) -`) f-)a-`)i-)r-\) -) ga-`)/m-)'e-),- Q)  -) s-)o-) re- Q)4v-`)i-)e-)w-)# -) t- Q)h-)a-)t-) -`) l-)a- Q)n-)guage-)w.-)  -\)  , Arial  :-(wWa- )Wy-F) s-@r)! -F)t-)o-)# -F)s-)!t-F)u-)$d-)#y-)!:-) -(v1-F) . - @) -)Practi-F)c-)e-)  -F)a-)!n) s-F)we-)Kri-F) n-)!g -)1m-)0id-F)-t-)e-F) r-)m -F)@q-)!ue-F)@s-)tio-F)=n-)!s -F).w-)*ith-F)=o-)!ut-)0 -F)n-)!o-F) t-)es.-)M -(2-F) . - @) -)Practi-F)c-)e-)  -F)a-)!ns-F)=we-)Kri-F) n-)!g-)  -F)q-)!ue-F)@s-)tio-F)=n-)!s-) -F)o-)!n-)  -)o-F) l-)d-)  -F)an-)Bd-)  -F)n-)!e-F) w-)* -F)wo-)Kr-)k-F)s-)he-F)@e-)!ts-)- @ 2-(3w , Arial :-+KB3-F) . - @) -)Practi-F)c-)e-)  -)c-F)o-)!di-F)-n-)!g-)  -F)f-)r-F)o-)!m -)@s-F)c-)rat-F)Cc-)h-)  -(w -+KC4-F) . - @) -)Look o-F)v-)er co-F)d-)!e-)  -F)s-)amples o-F)n-)!-)li-F)n-)!e-)  -F)a-)!nd h-F)qa-)!nd-F)@e-)!d-F) --)out -F)`i-)n-)  -)c-F)l-)ass.-)j -(>w -+KC5-F) . - @) -)Come in-F) -)a-F) n-)!d-)  -)di-F)-s-)cus-F)Zs-) p-F)0r-)ob-F)@l-)ems-)n -F)w-)*it-F)h-)! -,)W-F)7o-)!lber-)` -(w -+KD6-F) . - @) -)Stud- )wy-) -F)wi-)8th-)0 -)c-F)l-)as-F)=s-)m-)0a-F) t-)es.-)M -(Kw -*tNewer -F)Co-)On-F)#c-)!e-F) p-)$ts-)3 @ 2-(w -*:O- Q)$b-`)j-)ec-),t-)--)o-)r-`)i-)e- Q)n-)t-)ed- Q)/ -`) m-)'e-)t- Q)h-)o-)ds- Q), -) a- Q)n-)d-) -) da-)/t-)a- Q) -) access-)~ (yw -*:Bu-`):il-)t-)--`)i- Q)n-\) -) Ja- Q))v-)a-) -) arra-`)Ny-)s-\) -(w -*:Bu-`):il-)d-`)i- Q)n-)g-) -) a- Q)n-) - Q) A-)$rra- Q)8yL-`)7i-)s-)t-)--`)li-)ke-\)/ - Q) l-`) i- Q)b-)rar- Q)8y-) c-`)#l-)ass-\)< -) us-`),i- Q)n-)g-) -) arra-`)Ny-)s-\) -) a- Q)n-)d-) -) c-`)l-)ass-\)< -) o- Q)b-`)j-)ec-),t-).-)  (_w -*:I-)t-)era-)=t-`)i- Q)n-)g-) -) w-`)$i-)t-)h- Q) -`) f-)or-\)) -`) l-)oo-)2ps- Q), -) a- Q)n-)d-\) -`) i-)t-)era-)=to-)'rs-\)$ -(w -*:C-`)!l-)ass-\)< -) o- Q)b-`)j-)ec-),t-) a- Q)#n-)d-) -`) i- Q)nh-)2er-`)'i-)t-)a- Q)n-)ce-), ( Ew -*:I- Q)n-`)f-)o-)r-`)m-)'a-)t-`)i-)o-)n- Q) h-`)&i-)d-`)i- Q)n-)g-\) -( w -*:S-)t-)a-)t-`)i-)c-\) -`) m-)'e-)t- Q)h-)o-)ds- Q), -) a- Q)n-)d-) - Q) v-)ar-`)'i-)a- Q)b-`)l-)es-\)) -( +w -*:Pars-`)Vi- Q)n-)g-) -) a- Q)n-)d-) - Q) L-)e- Q)x-`)i-)ca-`),l-) - Q) An-)=a-`)ly-)'s-`)i-)s-\) -( w - Q*:W-)/e- Q)b-) De- Q)Gv-)e-`)l-)o-)p-`)m-)'e- Q)n-)t-)  ! ! ! !  ! ! !  ! ! !  ! ! !  ! ! !  ! ! !  ! ! !  ! ! !  ! ! ! ՜.+,0x `hpx  A'| Linux TutorialU The final is comprehensive. It will be similar to the midterms, but with more of Ways to study:8 Practice answering midterm questions without notes.; Practice answering questions on old and new worksheets Newer Concepts On-going Concepts Programming terminology Information Hiding Static methods and data Dynamic Web Pages Anatomy of a program:* Be able to define and identify terms: Strings Lists and Iteration Types Object-Oriented Programming Tracing Programs& Beneath the Hood-- Bits and Bytes Title Headings  !"#$%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKMNOPQRSVRoot Entry F5X1Table#WordDocument$&SummaryInformation(&KDocumentSummaryInformation8LCompObjX FMicrosoft Word DocumentNB6WWord.Document.8