| CIT591 Midterm Exam Fall, 2005 |
Name Answer Key
|
Please keep all your answers short and to the point. Do not provide extra information that was not asked for.
| if(X>Y){X=Math.sqrt(X-Y)+Y;} |
if (X > Y) {![]() ![]() ![]() X = Math.sqrt(X - Y) + Y;} |
| while | if-then | switch ({} required) |
| do-while ({} required) | for | try-catch ({} required) |
![]() |
// Simplest solution JFrame frame = new JFrame(); JPanel panel = new JPanel(); panel.setLayout(new GridLayout(4, 1)); frame.add(panel, BorderLayout.EAST); |
| (Can use BoxLayout instead of GridLayout, but then must add panels) | |