section c Flashcards
name of identifier
playgame
why is playgame public not private
allows it to be accessed from outside the class but the main functions, wouldn’t be possible if it was private
how many points do you lose if you choose moves 1, 2 and 3?
1
4
7
this shit basic asl
how do u modify grid size?
modify the line where Dastan is initialised with 6 6 4
instance of inheritance
kotla inherits from square
name of an identifier for a PRIVATE method with three parameters?
CreateMoveOption
name a Boolean variable
GameOver
Legit anything boolean
why is the random module used?
randomly selects the move offer option
what effect does the super routine in the class kotla have?
can use the method class in the parent class, even if polymorphism has taken place
is n^2 time complexity efficient, and how well does it scale up? (3)
efficient for small inputs
but as inputs grow, time increases
so it doesn’t scale up well
issue with using hard-coded string literals?
scope for typos so errors developed
what is overloading?
provide multiple implementations of a method with the same name
by selecting which version to run
by varying the parameters used
normal vs priority queues (note its a shit mark scheme)
Priority queue:
new data can join the queue in diff positions based on priority
they join at the back of their sub-queue
or join in front of their lower priority sub queue
why is it important to have multiple access modifiers
allows corrects encapsulation
leading to interaction via interfaces
also avoids exposure of dangerous attributes and methods
what is metadata and how can it be applied to dastan
data about the file/game itself
board size