FHTW Berlin |
It will cover material from the lectures and the lecture notes up to and including java.awt and laboratories up to and including the Scribbler. You may bring any notes or books you wish, as well as an English-German dictionary. You may bring refreshments, but no electronical devices, no telephones, no radios, no computers are allowed. If I catch anyone cheating (and I have eyes in the back of my head), you will be given an automatic failing grade for the course.
The format of this exam will be negative multiple choice and essay.
In negative multiple choice each question has exactly one correct answer and five incorrect ones. Instead of getting points for picking the right answer, you get points for eliminating the other (wrong) answers. Each wrong answer that you cross out is worth +2 points. However, if you cross out the right answer, that is worth -10 points. THis means that if you cross out all six answers, you get (5 * 2) -10 = 0 points.
This way, you can get full credit if you know which answer is correct by crossing out all of the incorrect answers. You can also get partial credit if you are sure that one of the answers is incorrect, even if you don't know which other answer is the correct one.
I will consider an answer to be crossed out if you have put an X through the letter at the beginning of the answer.
For example:
Similarly, you could realize that the woman teaching didn't look quite like Pamela Anderson, so now you are up to 4 points.
If you reach this point and are stumped, you can stop here. You would receive 4 points out of a possible 10.
If you remember that Karla Buchholz is the teacher for English, not Programming, you'd get another 2 points: 6/10.
And if you now decide that you've heard the name Lynn Andrea Stein so often, she must be the professor, you could eliminate Margarita Esponda and Debora Weber-Wulff.
Unfortunately, this would get you another +2 for Kathrin Freese-Kriesel, who is the department director, but a -10 for crossing out the name of the professor teaching the course, for a total of -2. It's a bad idea to eliminate a choice unless you are sure that it is wrong.
Another one?
public class Basic { public void printIt() { Console.println("Basic method"); } } public class Extended extends Basic { public void printIt() { Console.println("Extended method"); } }If the following line of code is executed, what is printed?
new Extended().printIt();
boolean isHappy = false;then the problem with the expression
isHappy == trueis that
public void act( ChannelInputStream[] ins, ChannelOutputStream[] outs)-- and ChannelInputStream has a readObject method specified as
public Object readObject() throws ChannelEmptyException, ChannelDisabledException;then the type of the expression ins[3].readObject() is
public class Test { // line 1 private String name; // line 2 public Test ( String name ) { // line 3 this.name = name; // line 4 } // line 5
public String getName() { // line 6 return this.name; // line 7 } // line 8
public void setName( String newName) { // line 9 this.name = newName; // line 10 } // line 11
} // line 12Which of the following statements is true?
You will find a number of questions like the ones above!
Then we have the essay part, there are questions like this here. Write in complete sentences, in English or German.
Question 1 (10 points): What is a class?
Question 2 (10 points): Can a class have more than one constructor?
If so, how are they differentiated?
Question 3 (10 points): What is the difference between int i; and
Integer
j; ?
Question 4 (10 points): What is the difference between a while and
a for loop?
Question 5 (60 points): Explain to a Martian how to solve the Spirograph
exercise.