
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Information about the cs1110 final exam, including review sessions, topics to be covered, and specific algorithms that may be asked for. Students are encouraged to attend review sessions and prepare by studying the specified topics and algorithms. Office hours with tas are also available for additional help.
Typology: Exams
1 / 1
This page cannot be seen from the preview
Don't miss anything!

CS1110 About the Final Friday, 8 December 9:00–11:30 am Barton West Office hours are canceled for the week after classes (be- ginning 4 May). However, if you want to see a TA, they will be happy to make an appointment with you. To make an appointment with Lillian Lee email her at [email protected] listing several possible times. To make an appointment with David Gries, call Cindy Pak- kala at 255 - 8240. Review sessions, beginning 4 May, expected to be in Phillips 101, but check the course website the morn- ing of the review session: Day Time Instructor Topic Mon 1 PM Yookyung Jo & Beibei Zhu Drawing frames for calls, executing method calls Mon 2PM Lillian Lee Casting, apparent/real classes; executing se- quences of statements involving creating/using objects Mon 3PM Nam Nguyen, Suyong Lee Writing constructors in classes and subclasses, abstract classes Tues 1PM Gries Developing loops from invariants Tues 2PM Shuang Zhao Developing the required algorithms Tues 3PM Ankur Agarwal Exception handling, GUIs Wed 1PM Kyle John- son Recursion The final is cumulative, covering all topics in the course except as described below. So, you have to know every- thing that was covered in the three prelims (and after the prelims, except as otherwise specified). See the hand- outs on the three prelims (on the course web page). You do not have to study the following topics: read- ing a file or the keyboard, applications, applets. You do have to know about:
Several algorithms. You know this already, but we repeat it for emphasis. One of the following algorithms can be asked for. We may simply write “show binary search”, or “Show us the partition algorithm”, and you have to give the precondition, postcondition, and loop invariant and then develop the algorithm. Or, we may give you the header of the method and you have to write the precondition and postcondition that goes with it and then develop it. We expect that: the loop with initializa- tion is developed from an invariant; a loop that has nothing to do with the invariant gets little credit. Every- one should get full credit on this question because it is simply a matter of (1) memorizing specifications and then (2) practicing developing known algorithms from their specs. For selection sort and insertion sort, write only a single loop, not a nested loop, as explained ad nauseum in lectures and in powerpoint slides and the text. Linear search, Binary search, Dutch National Flag, Par- tition algorithm, Selection sort, Insertion sort.
Developing an algorithm: stepwise refinement. We have used stepwise refinement in class many times, at- tempting to solve a little bit of a problem at a time. Read Sec. 2.5 on p. 82, and you might also study Sec. 9.2, p. 304, which discusses the development of several prob- lems that deal with arrays.
Arrays. You have to know about one-dimensional, rectangular, and ragged arrays. This includes knowing how to access the number of columns in a row and knowing how to create a rectangular array or a ragged array. You have to know how arrays are stored as ob- jects (folders) and to be able to draw an array.
Exception handling. Be able to write a class that extends Throwable, Exception, or RuntimeException, including the two constructors. Be able to write code to create an instance of such a class and throw it. Be able to write a simple try-statement with a single catch- clause. Understand what happens when an exception is thrown. Do not concern yourself with the throws clause in method headers; you won’t need it. See the chapter on Exception Handling.
Abstract classes. Know the purpose of making a class abstract and the syntax for it. Know the purpose of making a method abstract and the syntax for it. See Sec. 4.7 of the text and lesson page 4-5 of the ProgramLive CD.
Interfaces. Know how to write an interface and how to “implement” it in a class. Know how to use an inter- face as a type.
Placement of components in a GUI. The default layout managers for a JFrame, a JPanel, and a Box and how that manager arranges components in it. What these basic components are: JButton, JLabel, JTextField, JTextArea. Know the three things you have to do to be able to listen to an event. Be able to understand programs that place components in a GUI and the code for listening to an event. You do not have to write code for these.