Welcome! Log In Create A New Profile

Advanced

Exam questions & answers

Posted by iva 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
iva
Exam questions & answers
October 11, 2007 07:45PM
What did you guys say was the design pattern for the Employee-boss-engeneer question? i thought it was Composite

And the Exchange rate one was a wrapper/Adaptor right?
Re: Exam questions & answers
October 11, 2007 07:56PM
I used Composite for the first one.

For the Exchange one I used Singleton but I'm not sure it's right.
iva
Re: Exam questions & answers
October 11, 2007 08:12PM
what about the one where you ahve to say why the equivclass did not use a typedef? i had no idea . i thought later maybe because already equivclass is a set and wouldn't benefit frm further abstraction...
Re: Exam questions & answers
October 11, 2007 08:16PM
I used a strategy for the exchange.
iva
Re: Exam questions & answers
October 11, 2007 08:18PM
Anonymous User
Re: Exam questions & answers
October 11, 2007 08:50PM
For the Employee-boss-engineer question I wasn't too sure whether they were looking for the pattern to implement the Employee-boss-engineer relationship, or a pattern to implement the best solution for calculating the leave. I said in the end it is a strategy pattern and explained that I am using this pattern to cater for the different ways of calculating the leave.

For the exchange rate question I also said singleton. Guess both singleton and mono-state pattern could work here depending on how the system(s) is implemented.
Re: Exam questions & answers
October 11, 2007 09:09PM
Revenge Wrote:
-------------------------------------------------------
>
> For the exchange rate question I also said
> singleton. Guess both singleton and mono-state
> pattern could work here depending on how the
> system(s) is implemented.

The question wasn't very clear. I wasn't sure if they were talking about one application running on a server requiring one instance of the settings (singleton) or multiple separate applications that needed the same data (monostate?)?
iva
Re: Exam questions & answers
October 11, 2007 09:10PM
i gues the employee boss question could have been understood in several ways , ie what pattern is used for their relationships to each other , thats why i thought composite.. or if they were refering rather to the pattern involving calculations then strategy would make sense...

for the exchange rate also can me seen in more than one way, i saw it as what pattern can any user use and make the exchange rate be seemless to them getting a price, thats why i thought the adaptor would work to ffaciliate any exchange rate being applied but only with one function call passing the echange code "$" or "pound sign".. i don't understand how the singlton could be applied though?
Re: Exam questions & answers
October 11, 2007 09:12PM
iva Wrote:
-------------------------------------------------------
> what about the one where you ahve to say why the
> equivclass did not use a typedef? i had no idea .
> i thought later maybe because already equivclass
> is a set and wouldn't benefit frm further
> abstraction...

Wasn't sure about this either. I wrote that by defining EquivClass you don't have to refer to Set<QString*> everywhere and that it will allow you to easily change the underlying collection at a later stage without changing all the code.
Re: Exam questions & answers
October 11, 2007 09:19PM
iva Wrote:
-------------------------------------------------------
>
> for the exchange rate also can me seen in more
> than one way, i saw it as what pattern can any
> user use and make the exchange rate be seemless to
> them getting a price, thats why i thought the
> adaptor would work to ffaciliate any exchange rate
> being applied but only with one function call
> passing the echange code "$" or "pound sign".. i
> don't understand how the singlton could be applied
> though?

The singleton only makes sense if they all share the same application and want to ensure that all the departments refer to the same currency tables. But then again, I won't put money on that being right.
Re: Exam questions & answers
October 11, 2007 10:42PM
1) What the hell was the Containers they asked about? They way they asked the question I did not think it was the Value containers like QSet, QMap etc.

2) On the Employee boss question, I wanted to use the Composite, but the fact that the classes ibterfaces differ threw me a bit. I opted for the Visitor pattern, one class for visiting each object and one for processsing the vacation days.. am I completely off track?

Furthermore I cannot believe that I'm the only one who found this exam difficult and questions completely vague. This whole subject has been a farce since the start.

I'm going to write a letter to the lectures discussing the vaious problems that I've experienced doing this module.

If Anyone wants to add their 2 cents, please mail me at : mwolvaardt@mweb.co.za

Regards,

Marnus.
Anonymous User
Re: Exam questions & answers
October 11, 2007 10:50PM
If anyone's writing letters, may i suggest the Head of Department?
Re: Exam questions & answers
October 11, 2007 11:21PM
I agree, go straight to the top, but will CC the lecturers as well.
iva
Re: Exam questions & answers
October 12, 2007 06:55AM
mwolvaardt Wrote:
-------------------------------------------------------
> 1) What the hell was the Containers they asked
> about? They way they asked the question I did not
> think it was the Value containers like QSet, QMap
> etc.
>
i think they wanted containers of code i answered namespaces, packages and dlls but dunno if they are right , i think it came from chapter 7 on libraries
Re: Exam questions & answers
October 12, 2007 09:00AM
iva Wrote:
-------------------------------------------------------
> mwolvaardt Wrote:
> --------------------------------------------------
> -----
> > 1) What the hell was the Containers they asked
> > about? They way they asked the question I did
> not
> > think it was the Value containers like QSet,
> QMap
> > etc.
> >
> i think they wanted containers of code i answered
> namespaces, packages and dlls but dunno if they
> are right , i think it came from chapter 7 on
> libraries

You're right, it's from chapter 7.

libs - dll
objects - .o
source files - .cpp
etc.

Stupid question for a 3rd year subject!
Re: Exam questions & answers
October 12, 2007 09:46AM
boss-engineer - composite
exchange - I used monostate, but also said that singleton would be more appropriate, giving examples of both
Re: Exam questions & answers
October 12, 2007 07:22PM
I also used monostate for that exchange one.
I can't believe they asked that one about the library, how you would install it I think, luckily I looked at it, but why ask it???

The coding one, I had no idea how much to write, because it seemed like quite a bit to change for the first one, but only 3 marks?

Silly to say the least!

But it was a bit easier than expected
Sorry, only registered users may post in this forum.

Click here to login