Derivation and Inheritance

I’ve been studying for my next Microsoft exam, 70-526 and have been passing the practice exams provided on the CD. However, I’ve found a couple of questions that I have a problem with.

The first one is about the file types you can use to select an icon from. For this one, the explanation is correct, but the answer is marked wrong. Out of the options given, you can use dll, exe and ico files for icons. The explanation tells us this, however, unless you have marked only exe and dll, you will get the questions marked wrong.

The other question that annoyed me was one where the two likely candidates for a correct answer were similarly worded. One used the term ‘derive from’ and the other used the term ‘inherit from’. Now, I’m not about to declare myself a world authority on object orientation, but I use the two terms to describe the same thing – you extend an existing class, inheriting its properties and methods. To me, ‘I’m inheriting from this class’ means the same as ‘My class derives from this class.’ The explanation said that the one using the term ‘derive’ was the correct answer, stating that you ‘derive from an existing class’ and ‘inherit from an interface.’ To be honest, I’ve always ‘implemented’ interfaces. Surely the question would be clearer if it used the terms ‘derive from’ and ‘implement’?

Apart from that, I’m a lot happier with the official 70-526 book than the 70-536 one, although I can’t be sure if that’s because it’s been written more clearly or because I’m finding the material easier. There are a couple of nasty long chapters, my least favourite one being disconnected data which is about DataSets, DataAdapters and the such like, which I’ve never had a liking for. It kind of reminds me of using SQL in code like FoxPro. I usually like to code my objects using classes directly so I can do something like List<Categories> cats = BlogDatabase.GetEntry(5).Categories; as may well be somewhere in the code that generated the page you’re reading, rather than grabbing a BlogEntryRow and navigating a Relationship to get its CategoryRows. Plus, using a DataSet I couldn’t have a GetRssItem method in a blog entry class, I’d have to stick the code in a static method somewhere and pass it BlogEntryRow instances to get the XML. I guess it depends on how you’re going to use the data, they’re good for simple reading and writing of data. It’s just a bit difficult sometimes to learn things that you’d rather do another way.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • email
  • LinkedIn
  • Technorati