Halhelms
SIGN UP FOR MY NEWSLETTER
 
 
Halhelms

Upcoming ClassesUpcoming Classes

Real-World OO Programming

There’s so much hype and so many buzzwords surrounding object oriented programming, do you sometimes wonder if there’s anything behind the PR?

In this class, you’ll learn to master the art and science of writing OO applications—and put it to use to create apps that are easier to build and maintain.

Feb. 23-27, 2009 Sarasota, FL

Get More Info  


Newsletter Sign-UpNewsletter Sign-Up

By signing up for my Occasional Newsletter, you’ll also be kept informed of upcoming training.



Are You OO-Ready?, Take My Test!, Hal Helms

Are You OO-Ready?

Take My Test

Hal Helms

 

 

TrainingAre You OO-Ready


So, you think you're OO-ready, do you? Well, let's just see about that...

Here are some questions about the art and science of Object Orientation in ColdFusion that any ColdFusion OO developer should know. (Please be aware that all questions are ColdFusion-related, so references to "class", for example, are referring to CFCs.) Let's see how you do...

Q1) Any CFC that does not explicitly extend another CFC implicitly extends java.lang.Object

Q2) You have an array of blogPost objects in a Blog class. You need to create a remove method that will be passed a blogPost object. What is the correct way of determining whether two references point to the same object?

Q3) A "mix-in" refers to what?

Q4) Polymorphism is a key feature of OO languages. Since ColdFusion doesn't support method overloading, can it truly be said to support polymorphic behavior?

Q5) The decorator design pattern is best used to...

Q6) An abstract class is one that...

Q7) UML is primarily valuable for UML engines to generate code.

Q8) A "domain model" provides for...

Q9) "Lazy loading" describes the practice of:

Q10) A layered architecture is one in which...

Q11) Aggregation differs from composition in that...

Q12) A subclass's relationship to its superclass is one of:

Q13) A extends B. B extends C. C implements D and E. D extends F. Which of the following is NOT true?

Q14) Encapsulation occurs when a class's constructor is private, restricting access only to latent members of the class's supertype(s)

Q15) A CFC represents a data type

Q16) The Liskoff Substitution Principle states that...

Q17) A class that cannot be mapped to a dataschema directly is said to be transient.

Q18) Fill in the blank. Alan Kay once remarked, "I invented the term 'object-oriented' and I can tell you that I did not have _____ in mind."

Q19) JavaScript is an object-oriented language.

Q20) A mock object is one that...

Q21) A facade typically subsumes multiple classes behind a single interface.

Q22) Method-chaining is common in Java, but is not allowed in ColdFusion

Q23) An explictly-typed language is one in which...

Q24) Objects are created on a part of computer memory known as the...

Q25) Inversion of Control occurs when an object defers method implementation to its superclass.

Q26) myObj.doThis().doThat().doTheOtherThing() is an example of:

Q27) Methods should always return a value to provide the caller notification of the method's success.

Q28) Which design pattern that makes it possible to dynamically swap algorithms used to implement a particular function?

Q29) The term, Observer, defines a class that can be used by other classes but that cannot itself operate outside of its "internalized state" (Booch 94).

Q30) The term Interface-Driven Architecture refers to the need to "program to the interface and not to the implementation" (GoF).

Q31) "The user selects the Save option from the file menu in order to save the current document to disk. The system displays a "File Save" dialog which allows the user to specify the directory and filename. After the user specifies this information, the file is stored to disk." The preceding sentences are collectively known as

Q32) Code that maps object graphs to database schemas is often referred to by the term:

Q33) The term loose coupling refers to the practice of designing objects with a well-defined interface.

Q34) The term tight encapsulation is used when an object manages its own data persistence.

Q35) Polymorphism is an example of Polyamory.

Q36) The symbol for an unknown value in ColdFusion is...

Q37) What would the following produce:

<cfset x = "Hello World" />
<cfset y = x>
<cfoutput>
	#y.equals(x)#
</cfoutput>

Q38) What will this code produce?

<cfset x = "Hello World" />
<cfset y = CreateObject('java', 'java.lang.String').init("Hello World") />
<cfoutput>
#y#
</cfoutput>

Q39) The "Open/Closed" Principle states that software should...

Q40) The "Dependency Inversion" Principle states that...

Q41) The "Modularity Equality" Principle states that...

Q42) The set of public methods of an application may be said to be the...

Q43) A class invariant is a term that describes...

Q44) What will this code do if run?

<cfcomponent displayname="StudentTeacher" extends="Teacher, Student">
   <cffunction name="init" access="private">
	  <cfargument name="name" />
	  <cfargment name="age" />
   </cffunction>
</cfcomponent>
 
<cfset obj = CreateObject('component', 'StudentTeacher') />

Q45) A "Turing Test" evaluates the type safety of a class or classes.

Q46) A implements B. B extends C. D implements B and extends E. E extends F. F implements B. Excluding the base "Component" class, how many supertypes does A have?

Q47) Bob has a reference to an object, "myObject", of class A that extends B.cfc. Both A and B have methods called "doThis". If Bob wants to call B's "doThis" method, which code will do it?

Q48) Which design pattern encapsulates an action request as an object?

Q49) Which design pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses?

Q50) If A.cfc extends B.cfc and both have a method, "doThis", A's "doThis" may be said to have _____ B's "doThis".


Real World OO Development, Learn to Master OO from the Master Himself, Sarasota, FL, February 23 – 27 2009
   
 
   
Clicky Web Analytics