Shared Flashcard Set

Details

SWA Quiz 2
kllk
28
Computer Science
Undergraduate 2
05/19/2009

Additional Computer Science Flashcards

 


 

Cards

Term
The function used to retrieve a function from a DLL is _______________
Definition
GetProcAddress()
Term
When writing a polymorphic function, the most important aspect of a class hierarchy to consider is ________
Definition
virtual function table?
Term
Forward declarations help reduce ________ dependencies
Definition
circular dependences
Term
Data hiding refers to the OO principle of ________
Definition
encapsulation
Term
An object's type refers to its
Definition
Term
In a UML state chart diagram the syntax of a transition label is _______
Definition
event [guard] / action
Term
A static class variable gets created when
Definition
at the start of the program
Term
Describe the principle of Delegation
Definition
Dividing work between classes into deferent pieces
Term
What is the purpose of a Singleton?
Definition
only one instance of the class (make constructer private), global access - getinstance() thats static.
Term
Describe 2 key differences between the Facade and Factory Method patterns
Definition
Facade creates interface and functions. Process of hiding information - simplifying

Factory method: creation of the object

Term
What does the phrase "unresolved external symbol" mean?
Definition
linker error - can't find definition of function that we created
Term
Describe the difference between internal and external linkage
Definition
interal- methods that cant be touched by anything outside of the class

external- methods that can be accessed outside of the class = like... getinstance()

Term
Describe 2 advantages using a DLL has over using a static LIB
Definition
have control over memory process. can delete it when we dont need it, smaller.exe, can change dll and dont have to change code in the actual program (plug ins)
Term
Describe the concepts of Cohesion and Coupling
Definition
Cohesion- way to describe a module. Only does one thing, has minimal dependency, can work on it without breaking anything else

Coupling- modules depend on each other

Term
Describe the concept of Modularity
Definition
each behavior is seperated into its own module, makes it easier to understand and code. Harder to work with, because everything is scattered.
Term
Describe some benefits of Encapsulation
Definition
Prevents the program from accessing the data it doesn't need to.
Prevents clients of an interface from depending on parts of implementation that are likely to change in the future
It stops other people from stealing your code
Term
Describe the Model-View-Controller (MVC) concept
Definition
It helps us identify three common areas to most software applications

Model – The data
View – The way that data is shown to the user
Controller – How the user or OS interacts with the model or view (aka. the driver app)

Term
Explain how the concept of modularity applies to the State pattern
Definition
a state pattern is made up of modules
Term
How does the concept of polymorphism apply to the Factory Method pattern?
Definition
can overload the factories methods to create different objects
Term
On a state transition label, what is a guard condition?
Definition
A guard condition is the conditions that must be met before the Action takes place
Term
Which of the follwoing is NOT an OOP feature?
Definition
possibley anything besides:
* Inheritance
* Reusability
* Abstraction
* Polymorphism
* Encapsulation
* Data Hiding
* Overloading
Term
How do you activate dynamic binding for a class function?
Definition
create virtual functions
Term
What does the const keyword do in the following code?
const Enemy *GetNearest Enemy(const Vec2f & _location) const;
Definition
Term
Write the rotation matrix of 90 degree about the Y-axis
Definition
{cos90, 0, sin90
0, 1, 0,
-sin90, 0, cos90}
Term
Write the rotation matrix of 90 degree about the X-axis
Definition
{1, 0, 0
0, cos90,-sin90,
0, sin90, cos90}
Term
Write the rotation matrix of 90 degree about the Z-axis
Definition
{cos90, -sin90, 0
sin90, cos90, 0
0, 0, 1}
Term
Given the following matrix A =
[1 2 3
2 5 7
6 7 5],
find the transpose matrix of A
Definition
[1 2 6
2 5 7
3 7 5]
Term
A directory called CPP has 3 subdirectories within it. The names of the 3 subdirectories are Guaba, Goya, and Spam. My program EXE gile is in the Spam directory. In my program, what path should br used to access the file Can.pcx in the Guava directory?
Definition
"../Guava/Can.pcx"
Supporting users have an ad free experience!