Showing posts with label Oops. Show all posts
Showing posts with label Oops. Show all posts

Explain What is a chain of responsibility pattern ?

Sunday, March 13, 2011

The chain-of-responsibility pattern is a design pattern consisting of a source of command objects and a series of processing objects. Each processing object contains a set of logic that describes the types of command objects that it can handle, and how to pass off those that it cannot handle to the next processing object in the chain.


1.www.codecollege.NET 2.http://www.interviewsguru.com 3.The Encylopedia of Web Sites 4.Blogging and Earning

What is Aggregation ?

Wednesday, August 5, 2009




Aggregation is a form of composition where one looks at the system as a whole rather than as parts.


www.codecollege.NET

What is Composition ?




Composition is a way to combine simple objects or data types into more complex ones.


www.codecollege.NET

What is Association ?



Association defines a relationship between classes of objects which allows one object to cause another to perform an action on its behalf.


www.codecollege.NET

What is Polymorphism ?



A feature using which more than one definition is given to a single method or operator.


www.codecollege.NET

What is Encapsulation ?



It is a feature which hides data and functions from others classes.


www.codecollege.NET

What is Hybrid Inheritance ?



A class inherits from more than one type of Inheritances mentioned above.
Ex:
It inherits from multiple and also multilevel


www.codecollege.NET

What is Multilevel Inheritance ?



classes inherits from parent classes in multiple level, ie Child inherits from Parent and grandchild classes inherit from Child , like that.


www.codecollege.NET

What is Multiple Inheritance ?



A class inherits from more than 1 class.


www.codecollege.NET

What is a Single Inheritance ?



A class inherits from a single class.


www.codecollege.NET

What are the major Types of Inheritance ?



The major Types are:
Single
Multiple
Multilevel
Hybrid


www.codecollege.NET

What is Inheritance ?

A feature in which the base class’s characteristics and behavior are derived to the child class also.

What is an Object ?



Is an instance of a class. It will be exactly the same as a class but can be assigned values and used whereas a class can’t be used without creating objects.


www.codecollege.NET

What is a Class ?


Class:
It defines characteristics of a thing and its behavior. It is blueprint based on which objects are created.
Example: Employee (which will have all the details about the employee like name, id, salary, etc and the methods which describes his behavior like calcSalary(),displaydetails(),etc.


www.codecollege.NET

What are the 3 important object oriented concepts ?


1. Polymorphism
2. Inheritance
3. Encapsulation


www.codecollege.NET

What are the different ways a method can be overloaded ?


1. With different number of arguments
2. With different datatypes of arguments
3. With different order of arguments


www.codecollege.NET

Can you declare an overriden method to be static if the original method is not static ?


No.


www.codecollege.NET

What’s the implicit name of the parameter that gets passed into the set method/property of a class?


Value.


www.codecollege.NET

Can a method alone be sealed ?


Yes.


www.codecollege.NET

How will you prevent your class being inherited by another class ?


Make that class as Sealed.


www.codecollege.NET

LinkWithin

Blog Widget by LinkWithin

Recommended Books