mrry (Happy New Year)
 
Blog Computing Science 3Q - Advanced Programming 3 17/May/2004

So, it was back into the St. Andrew's Building Gym (which seemed more like an assembly hall to me, and why were the basketball hoops so far over to one side, but it was reasonably well-lit, so not all bad, then) for the second time today, for one of the most curious exams that we sit.

There is a dichotomy in the class. Those who used Java extensively in their team projects know most of the course implicitly, and the exam proves relatively straightforward (bear in mind that the level of programming expected in the exam isn't really much higher than at second year, except it's in Java (rather than Ada), with the added tribulations that that brings). The other half, comprising those who haven't done a project, or who did one without Java, haven't really used Java since the module ended at Christmas, and their experience has been hindered by such concoctions as the "fill-in-the-blanks" Assessed Exercise. Mind you, perhaps we should look more at the exam than at the pedagoguery.

Question 1 was about playing cards, and was - rather surprisingly - a drastically pared-down version of the August 2001 Question 1. The question was almost perfectly a subset of its predecessor, and more easily-understood for those students who don't enjoy a game of whist from time to time.

Question 2 was probably as hard as it could be, given the context. It was essentially about writing linked list code (in the context of interfaces and inheritance), which - given the availability of java.util - seems spurious at best. Thus, it yielded some tricksy coding, with which one can usually employ trial-and-error in a real-life environment with a compiler to hand. Not only that, there were two impossible subquestions:

  1. "State what... qualifier... must be [used] if the associated declarations are to be available to any subclass of LQueue but to no other class."
  2. "Write an interface... that... defines... a nested interface... that specifies a suitable catch() method...."

In the first case, you'll no doubt be thinking protected, and I'm certain that that's the answer being sought. Never mind that all classes within the same package, subclass or not, can make use of protected members. So it's obviously not public or private, and probably not default access - by a process of elimination, it must be protected (even though it doesn't answer the question). No wonder it's poorly understood.

The second question is probably more egregious - a method with the same name as a Java keyword. Thanks to Chris for the spot. Never mind that the rest of the question was mightily ambiguous (an Item, acting as a filter, "catches" other Items, or Objects, or does it?). It might have been better to give us Filter and Filterable interfaces, and let us derive the code from them. That would also have made the rest of the question more intuitive, since it decrees, "[Ignore] any attempt to queue objects that cannot be filtered." How do we know this if there's not Filterable interface? And, if it's to be declared as some property of this Item interface, why not just use Object.equals()?

Either way, a rather confusing end to the exam for most of us.

Did anybody do question 3? As always, about concurrent programming, I can't see why anybody would take the risk. It was about Customers and Accounts, and seemed relatively simple for a question 3, but I wasn't going to risk it. Did you?

It seems that there was plenty with which to be disgruntled in this, but it probably wasn't so bad, the repeated question being a bonus. I think the teaching methods will need to change, however, if the disparity between the two halves of the class is to be rectified.

Cheers,

Derek.

 
CommentsComments 

Len said:
I did 3, had done 2(a) before looking at the second part. Nesting interfaces is not my forte. The threading question was ok but not fantastic...kinda had to mimic a spinlock semaphore but in an efficient way (using wait(), basically).

Cabumbo said:
I did 1 & 2 as well and feel i may have screwed up 2 :/ Three was just a no no, although it looked like one of the simpler multithreading questions

Name

E-Mail

Url

Comment

Please enter the number 2313 in the box below:

 
CommentsTell a friend about this page

Your Name

Your E-Mail

Your friend's E-Mail

 
SideboardSideboard


< # Scottish Blogs ? >
Technorati Profile
Listed on BlogShares

Subscribe to the mrry RSS feed
More about RSS.
Trackback URL for this article:
http://www.mrry.co.uk/trackback/1771