Posts: 426
Threads: 4
Joined: Aug 2011
Reputation:
0
12-22-2011, 11:53 AM
Hi,
I want to implement the class concept in my framework/Script. Anyone of you have any idea how to use it and what is the importance of using this concept in scripting language like VB.
Regards,
Sankalp
Posts: 426
Threads: 4
Joined: Aug 2011
Reputation:
0
12-22-2011, 01:28 PM
Hi Ravi,
Thnks for the reply. But could you please elaborate the importance and usage with respect to QTP.
Regards,
Sankalp
Posts: 426
Threads: 4
Joined: Aug 2011
Reputation:
0
12-22-2011, 03:54 PM
Hi Ankur/Saket,
Could you please help me over this as this is bit urgent and quite important/interesting for me.
Regards,
Sankalp
Posts: 257
Threads: 10
Joined: Oct 2011
Reputation:
2
12-22-2011, 10:16 PM
It is basically used for achieving
1.Encapsulation(or information hiding)
2.Inheritance
3.Polymorphism
Encapsulation
--The encapsulation is the inclusion within a program object of all the resources need for the object to function - basically, the methods and the data. In OOP the encapsulation is mainly achieved by creating classes, the classes expose public methods and properties. The class is kind of a container or capsule or a cell, which encapsulate the set of methods, attribute and properties to provide its indented functionalities to other classes.
Inheritance
--Ability of a new class to be created, from an existing class by extending it, is called inheritance.
Polymorphism
--Polymorphisms is a generic term that means 'many forms'. More precisely Polymorphisms means the ability of a same function exibhiting different forms based on context.The function only differes in the arguments and has the same name in all the classes where it is used.
Posts: 426
Threads: 4
Joined: Aug 2011
Reputation:
0
12-23-2011, 03:44 PM
Hi,
Thnks for the reply. I think we can use encapsulation is QTP but inheritance and Polymorphism is not supported by QTP.
But the thing I am looking for is some real kind of example using OOPs concept in QTP which can enhance the modularity and resuability of my scripts.
Regards,
Sankalp