|
home—info—exams—lectures—labs—hws
Recipe—Laws—lies—syntax—java.lang docs—java.util docs
Exam2 will be given be during class on Apr.03 (Tue). It will consist of questions very much like these or questions, the quiz2 study questions, and perhaps a few similar to the book's study questions for Chapters 5-7. Some of the questions will be exactly from here, lab, quiz2-study-questions, or Chapters 5-7.
Study Sheet -- you can bring one page of notes to the exam: hand-written (no machine reproduction in any way), single-sided, 8.5″x11″
The material from Exam1 won't be especially tested, but due to the cumulative nature of the material, you should know all the topics from the exam1 study questions. In addition, you will need to know syntax for the if statment (and its variants), and for-each loops. Know the difference between == and .equals.
You will not need to know/use “import”, “static”, or classes such as java.io.File.
For the classes String, java.util.LinkedList<SomeType>, and the wrapper classes (Double, Boolean, etc.) you will not need to memorize the names of any of the methods or fields for those classes (beyond calling their constructor). However, if you are provided with documentation (for any of these classes or others), you should be able to create instances of that class and call its methods appropriately.
For these practice questions, feel free to discuss answers on the WebCT discussion board(s). Problems tagged as “[Challenge]” or “Optional” aren't necessarily difficult, but might rely on remembering details or concepts which weren't stressed. Such problems would be extra credit if they were on the test at all.
When giving a java expression or statement, you should be able to type it into BlueJ's Code Panel without any error; this means knowing where you need parentheses, where you need squirly-braces, and where you need semicolons (though I'll give some slack on these). I particularly recommend the problems which require actual code or definitions.
Review Questions
/** Change the input to be one bigger. * @param n the number to find the successor of. */ void |
double x = 5.0; double y = 7.0; swapDoubles( x, y ); (x == 7.0); |
Explorer me = new Explorer( "Dora" ); Treasure t1 = new Treasure( "a singing map", "It guides you: over, around, and up.", 0.05, ""); me.grab( t1 ); me.grab( new Treasure( "a collideascope", "Like a kaleidoscope, but more dangerous.", 1, "" ) ); me.dropLeft(); |
1nor (old-school) for loops, as separate from the for-each loop. ↩
2Meaning, how people can use this function. The term “interface” is also a (related-yet-different) Java keyword, which we'll talk about in the last week of class. ↩
home—info—exams—lectures—labs—hws
Recipe—Laws—lies—syntax—java.lang docs—java.util docs
©2007, Ian Barland, Radford University Last modified 2007.Aug.27 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |