❔ Some theory questions I'm unsure about :)
I just have a few questions that I'm unsure about when I was revising for an exam. Sorry if some are a bit stupid but I just want to make sure. Could anyone answer some of these if you're sure about the answer?
(on this one I am confused because I believe that both 2 and 3 could be right in a way, but only one can be)
1) A C# Interface is basically (1 correct):
1. A specification of how an object can be used -
2. A specification of how a class will publicly implement something -
3. Essentially an abstract class -
4. None of the above is correct -
2) In c#, which among the listed options is has greatest advantage over the others (inheritance, encapsulation, polymorphism)? __ (if i'm not mistaken that's such a weird question because a lot of different things can depend on that)?
3) 7) 33. Which of the listed principles are used in this C# code?
----------------------------
int p = 3;
Func<int, int> q = x=>x * p;
p = 5;
int answer = q(2);
---------------------------
1. deferred execution -
2. polymorphism -
3. variable hoisting -
4. multitype -
5. generic types -
6. interfaces -
4) C# extension methods are useful in __ classes (1 correct):
1. generic -
2. .NET -
3. user -
4. a+b+c -
5) What can we create with generic types? (1 correct):
1. object -
2. sequence -
3. encapsulation -
4. none of the above -
28 Replies
let's start with what YOU would say the answers are
except for #2, you're right, that's a nonsense question
Only like 2 of these questions make any semblance of sense
For #1 and #2 i already said kind of what i think. For #3 i'm honestly not sure i can just take lucky guesses. For 4 I would assume it would be number 4. and for #5 i would assume it's none of these but I cannot give a true reason why
Oh boy if I gave you all of the questions that we can have on this exam you would lose even the rest of your sanity. These aren't even as bad as some can be :d
oh, so that's YOU saying "1 correct" for #1? Yes, that's correct
Yup. There's supposed to be only 1 right answer. Though Idk because it's probably answer 2, but in a way interfaces are technically also abstract classes no?
for #3, there are at least 3 correct answers. I dunno what the hell "multitype" is supposed to mean
not really, no
you do kinda have a point, though #2 is also arguably correct
both of those are really not-good answers
me, I'd lean towards #1 being least-not-good
the point of an interface is specifically that is HAS no implementation" so I think that one's worse
an interface does NOT define an implementation, only the structure that MUST be implemented
alternatively, what ab implementation must LOOK like
1.2? i would say its completely wrong, it sounds like the interface dictates implementation details, which is wrong
it's also incorrect to say that an interface defines how consumers use it, it's more correct to say it definesbwhat implementers can DO
but it's arguably sensible to say it defines HOW consumers CAN use it, so thay one gets it for me
exactly
but I could see how someone writing this whole document could (poorly) aruge that "publicly implement" means "doesn't include the details, just the public surface"
question #4 is also nonsense. I don't know what the hell an "a+b+c" class is, but the only possibly correct answer here is "all of the above"
Honestly this is hilarious. Every time I ask people about any questions that we have in this subject there's always such a division because the questions are so terribly worded at times. I think some people might even pass out after seeing the whole document of these questions I got here.
there really is no other argument to be had
#5 also only makes sense if all answers are correct
by which I mean none of those answers makes any REAL sense, but can all arguably fit the sentence
this screams of an instructor who is taking lecture talking points and translating them directly into questions, where the "correct" answer is the one that matches a lecture note word-for-word
and the rest are jusy random, with no thought for context
so, my best advice is "go look at lecture notes or slides, if you can"
I think this is honestly the way. Although the slides we got are mostly filled with even more nonsense. It's just the problem with the lecturer because he's the type of person that goes off of some ancient books and then believes he's always in the right and builds the exams in such a way that even coding "experts" could easily fail it :/
I kinda want to see some more questions out of curiosity
same
morbid curiosity
Haha for sure. Is it okay if i dm you guys a txt with all of the questions I got? Or do i just send it here if that's fine
here is fine
Brace yourselves
yeah these do not make sense
8.6 is very much not correct
13 is 4, I would say
4.3 is incorrect
I'm assuming at this point "DA" somehow stands for the answers you're picking?
That's right. It basically means YES
ah
15.4 is nonsense, but I think I agree, it's the least-incorrect one there
19 is wrong, 1obj, 2ref
Oh yes. 19 was a typo. It was supposed to be 1 + 2 thanks for pointing it out
26 is a restatement of 9, could elaborate if you want
27 is missing, lol
Yup i've noticed. I saw that question twice so i put it there twice as well. I was just kind of unsure because the choices were a bit different in each question but I think 26 makes much more sense
33 is crap, 23 and 3 are both acceptable, or even optimal, depends on context
1.75 is crap, all answers are incorrect
#3 in part 2, both 1 and 2 are correct
#6 in part 2 is incorrect, correct answer is 3
sweet. I really was not too sure about some of these yeah and just went with what felt most right and also using "logic" from this guy's slides lol. And some are just nonsensical and I'm not sure how he comes up with them
i knew that weird question style was familiar, we discussed #7 the other day
and the conclusion was, that like that no answer is correct due to case sensitivity
lol
I would 100% put that answer, if I could
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.