Object-Oriented Programming and Windows Workflow Fundamentals
A comprehensive quiz covering OOP concepts, C++ memory management, C# programming, and Windows Workflow Foundation fundamentals
Questions
If a catch statement is written to catch exception objects of a base class type, it can also catch all _____ derived from that base class
- Exceptions for objects
- Objects of classes
- Arguments
- Errors
Association in UML can be represented by:
- Only with a double line between base class & derived classes
- A plane line with no shape on either end
- A line with an arrow-head pointing in direction of parent or superclass
- Diamond shape between classes
Suppose that the Test class does not have an overloaded assignment operator. What happens when an assignment a=b; is given for two Test objects a and b?
- The automatic assignment operator is used
- The copy constructor is used
- Compiler error
- Run-time error
Peer-to-peer relationship is a type of _________.
- Association
- Aggregation
- Link
- None of these options
Which of the following are good reasons to use an object oriented language.
- You can define your own data types
- An object oriented program can be taught to correct its own errors
- It is easier to conceptualize an object oriented program
- You can define your own data types and It is easier to conceptualize an object oriented program
What is the result of this code? myObj *foo = operator new(sizeof(foo));
- That's not legal syntax!
- foo has memory allocated for it, but is not constructed
- foo has memory allocated for it, and is fully constructed
- None of the above
What is wrong with the following code? int * x = (int *) malloc(100 * sizeof(int)); x = realloc(x, sizeof(int) * 200);
- If realloc fails, then the original memory is lost
- Nothing, realloc is guaranteed to succeed (by returning the original pointer)
- Nothing, realloc frees the original memory passed to it
- None of the above
An application uses encapsulation to achieve ________
- Information hiding
- Minimizing interdependencies among modules
- Make implementation independent
- All of these options
When a class uses dynamic memory, what member functions should be provided by the class?
- An overloaded assignment operator
- The copy constructor
- A destructor
- All of these options
Which are the main three features of OOP language?
- Data Encapsulation, Inheritance & Exception handling
- Inheritance, Polymorphism & Exception handling
- Data Encapsulation, Inheritance & Polymorphism
- Overloading, Inheritance & Polymorphism
Reusability can be achieved through?
- Inheritance
- Composition
- Association
- All of these options
We can write any C# code on the code behind of workflow. True or false
- True
- False
How to pass data to a workflow
- using Bookmark resumption
- Using InArgument
- Using variables
- using bookmark resumption and using InArgument
- None of this
How to access an outargument in the designer
- using variable assigned to the OutArgument
- Using InArgument assigned to the OutArgument
- It is not possible
- None of the above
How to resume a bookmark
- workflowApplication.ResumeBookmark(bookmarkName, null)
- workflowApplication.ResumeBookmark(bookmarkName)
- workflowInvoker.ResumeBookmark(bookmarkName, null)
- workflowInvoker.ResumeBookmark(bookmarkName)
Which technologies are used in Activity designer
- WPF
- Windows
- Silverlight
- workflow
How to define a designer for an activity
- Add the Designer attribute to the Activity class
- Assign ActivityDesigner name in the Activity Constructor
- By overriding cacheMetadata
- None of the above
Whether InOutarguments are supported in WF4.0
- True
- False
Activitydesigner is a Xaml file with no code behind
- True
- False
Which method in custom activity contains the execution logic
- Exec
- Execute
- CacheMetadata
- beginExec