Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
OOP Concept with Real Time Exapmles
OOP is OOP is a design philosophy. It stands for Object Oriented Programming.O Programming.Object-O bject-Oriented Programming (OOP (OOP ) uses a different set o programming languages than old procedural programming languages. Everything in OOP is "objects". ". Hence, you ga OOP is grouped as self sustainable "objects re-usability by means of four main m ain object-oriented programming concepts. The object oriented programming (OOP) is a programming model where Programs are organized around object and data rather than action and logic.
In order to clearly understand the object orientation, let’s take your “Le as an example. The “Leg” is a class. Your body has two objects of type Le named left Leg and right Leg. L eg. Their main functions are controlled/ manag by a set of electrical signals sent through your body parts(through an interface). So the body part is an interface which your body uses to inter with your Legs. The Leg a well architect ed class. The Leg is being re-use create the left Leg and the right Leg by slightly changing the properties o Now we can go through the concepts,
Class Class is the core of any modern OOP language. We must create a class representing Data. A user-defined data structure that groups properties a methods. A class is simply a representation of a type of object of object . It is the blueprint/ plan/ template that describe the details of an object . A class is Sign up to vote on this title blueprint from which the individual objects are created. Class is compose Not useful Useful doesn’t three things: a name, attributes, and operations. Class occupies memory. Its a logical representation of Data.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
When we use "new" keyword for creating object, then memory wi be allocated for the class in heap, we can call an instance and its starting address will be stored in the object in stack. When an object is created without the keyword new, then memory will not allocated in heap Means instance of the object wont create and object in the stack havenull have null value. When an object contains null then it is not possible to access the members of the class with th object. Leg objLeg = new Leg(); In fa ct classes classes describe describe the type type of objects, objects, while objects objects are usable instancesof classes. Struct and Class Struct is value type while class is reference type. Struct stored in Stack Class stored in Heap. Struct wont support Inheritance but class Support. Struct using for Simple/small data structure class is a better choi for complex data structure. A class and Struct can implement more than one interface. The fact that Struct can implement an interface is well known and so is the fact that casting a value type into an interface leads to boxing of the value typ Boxing and Un-Boxing Boxing: means converting value-type to reference-type. UnBoxing: UnBoxing: means converting reference-type to value-type.
this Keyword Sign up to vote on this title Each object has a reference “this” which points to itself.Uses of this keyword Useful Not useful are, o Use to refer to the current object.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
} Sheet Music
Abstraction
Abstraction is the process of hiding how the object is working, an its only showing the information of the object the way we can understand it. Means it represent the essential details with out showing ground details. We putting all variables and method in a class which are necessary.
Eg: Employee and Patient.
Company interested interested to fill about the Employee details like Name, Address, Qualification, DOB, Age, Mobile, Marks, Experience etc
Hospital interested to fill about the patient details like Name, DO Height, Weight, Age, Address, Mobile, Blood Group etc. etc.
Both Company and hospital interested to fill some common fields like Name, Age, DOB, Address, Mobile etc. So we can create a cla which consist of common thing that is called abstract class. This class wont be complete but can inherit by other class. Sign up to vote on this title
Useful Not useful Difference between Abstraction and Interface please refer:
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
internal details of an object, i.e. how an object does something. Here capsule is a single Unit contain many things. But we cant what is there in side capsule.
This is the technique used to protect information about an objec from other objects. Like variable we can set as private and prope as Public. When we access the property then we validate and set
We can go through some other examples. Our Laptop. We can us Laptop but what operations are happening inside that we are not knowing. But we can use that. Same like mobile, TV etc.
We can conclude that a group of related properties, methods, and other members are treated as a single unit or object.An encapsulated object is often called an abstract data type.
There are several other ways that an encapsulation can be used, as an example we can take the usage us age of an interface. The interface can be us hide the information of an implemented class. //Declare as Private private string _LegName; // Property Set as publicpublic string LegName {get{return _LegName; }set { Sign up to vote on this title _LegName=value; Useful Not useful } public class LegMain
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Constructor A special method of the class that will be automatically invoked when an instance of the class is created is called as constructor. Constructors can be classified into 5 types
1. Default Default Constr Construct uctor or 2. Parame Parameter terize ized d Construct Constructor or 3. Copy Copy Const Constru ruct ctor or 4. Static Static Constr Construct uctor or 5. Privat Private e Constr Constructo uctorr Default Constructor : A constructor without any parameters is called default constructor. Drawback of default constructor is every instance of t class will be initialized to same values and it is not possible to initialize ea instance of the class to different values. Parameterized Constructor : A constructor with at least one paramete called as parameterized constructor. Advantage of parameterized constructor is you can initialize each instance of the class to different va
Class Leg() { //default Constructor public Leg() { Name = "Left"; Num = 2; }
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
1
Download
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
of 29
use oops
Search document
Leg L1 = new Leg(); //Default Constructor is called Leg L2= new Leg("Left",2);//Parametrized Constructor is called L1.Print(); L2.Print();
Console.Read();
} Copy Constructor : A parametrized constructor that contains a paramet of same class type is called as copy constructor. Main purpose of copy constructor is to initialize new instance to the values of an existing instan class Leg { string A; int B; public Leg(string I, int J) { A = I; B = J; }
//Copy Constructor public Leg(Leg T) { A = T.A; B = T.B; } public void Print()
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
Download
Join
of 29
use oops
Search document
class CopyConstructor { static void Main() {
Leg L = new Leg ("Left", 2);
//Invoking copy constructor Leg T1 = new Leg (L); L.Print(); L1.Print(); Console.Read(); }
} Static Constructor : You can create a constructor as static and when a constructor is created as static, it will wi ll be invoked only once for any numb of instances of the class and it is during the creation of first fi rst instance of th class or the first reference to a static member in the class. Static constru c onstru is used to initialize static fields of the class and to write the code that nee to be executed only once.
Private Constructor : You can also create a constructor as private. Whe class contains at least one private constructor, then it is not possible to create an instance for the class. Private Priv ate constructor is used to restrict the Sign up to vote on this title class from being instantiated when it contains every member as static. Useful Not useful A class can have any number of constructors. A constructor doesn’t have any return type even void. • •
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Syntax : ~Leg() { } What is the difference between the destructor and the Finalize() method? When does the Finalize() method get called? cal led?
Finalize() corresponds to the .Net Framework and is part of the System.Object class. Destructors are C#'s implementation impl ementation of the Finalize() method. The functionality of both Finalize() Final ize() and the destructor the same, i.e., they contain code for freeing the resources when the objec about to be garbage collected. In C#, destructors are converted to the Finalize() method when the program is compiled. The Finalize() method i called by the .Net Runtime and we can not predict when it will be called. guaranteed to be called when there is no reference pointing to the object and the object is about to be garbage collected. Inheritance
In the real world there are many objects that can be specialized. In OOP, parent class can inherit its behavior and state to children classes. This concept was developed to manage generalization and specialization in OO and is represented by a is-a relationship. The following OO terms are commonly used names given to parent and c classes in OOP: Sign up to vote on this title
Superclass: Parent class. Subclass: Child class. Base class: Parent class.
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Multiple inheritance is the possibility that a child class can have multiple parents. Human beings have always two parents, so a child will have characteristics from both parents. Single Inheritance the child c hild can have o one parent class and viz.When more than one derived class are created fr a single base class, then that inheritance is called as hierarchical inheritance.When a derived class is created from another derived class, th that inheritance is called as multi level inheritance.Any combination of single, hierarchical and multi level inheritances is called as hybrid inheritance.
Sealed class
A sealed class is a class that does not allow inheritance. Some object mo designs need to allow the creation of new instances but not inheritance, i this is the case, the class should be declared as sealed.
To create a sealed class in C#, the class declaration should be done d one as: sealed class Shape Polymorphism
Through inheritance, a class can be used us ed as more than one type; it can used as its own type, any base types, or any interface type if it implemen interfaces. This is called polymorphism. Sign up to vote on this title
Useful
Not useful
Polymorphism means having more than one form. Overloading and overriding are used to implement polymorphism
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Compile time Polymorphism or Early Binding
The polymorphism in which compiler identifies which polymorphic form it to execute at compile time it self is called as compile time polymorphism early binding.
Advantage of early binding is execution will be fast. Because every thing about the method is known to compiler during compilation it self and disadvantage is lack of flexibility.
Examples of early binding are overloaded methods, overloaded operators and overridden methods that are called directly by using derived objects.
Runtime Polymorphism or Late Binding
The polymorphism in which compiler identifies which polymorphic form to execute at runtime but not at compile time is called as runtime polymorphism or late binding.
Advantage of late binding is flexibility and disadvantage is execution will slow as compiler has to get g et the information about the method to execute Sign up to vote on this title runtime. Useful Not useful Example of late binding is overridden methods that are called using base
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
} }
Example for Over loading
Class A { class a() { } class a(String Name) { } }
In other words, "Many forms of a single object is called Polymorphism."
Eg : A Team Leader behaves to Sub Ordinate. A Team Leader behaves to his/her seniors. A Team Leader behaves to other Team Leaders. Sign up to vote on this title Useful Not useful
Here Team Leader is an object but attitude is different in differen
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
overridden in a derived class (subclass), the version defined in the derive class is used. This is so even should the calling application be unaware th the object is an instance of the derived class. Method hiding does not have a relationship between the methods in i n the base class and derived class. The method in the derived class hides the method in the base class.
Sealed keyword can be used to stop method overriding in a derived classes. By default, all methods a sealed, sealed, which means you can't override them so that "sealed" keyword is redundant in this case and compiler will show you error when you'll try to make sealed already sealed method. But if y method was marked as virtual in a base class, by overriding and marking this method with "sealed" will prevent method overriding in derived classe Conclusion Oops features make you to continue forward as the most effective programmers in the most productive programming language. Polymorphism: Example of Compile Time Polymorphism Method Overloading - Method with same name but with different arguments is called method overloading. - Method Overloading forms compile-time polymorphism. - Example of Method Overloading: class A1 { void hello() { Console.WriteLine("Hello"); } Sign up to vote on this title void hello(string s) { Console.WriteLine("Hello {0}",s); } }
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
virtual void hello() { Console.WriteLine("Hello from Parent"); } } Class child : parent { override void hello() { Console.WriteLine("Hello from Child"); } } static void main() { parent objParent = new child(); objParent.hello(); } //Output Hello from Child.
Use of WPF? Programs that need access to Windows desktop files.
The Windows Presentation Foundation (WPF) is a graphical display system for Window
WPF is designed for .NET, influenced by modern display technologies such as HTML a Flash, and hardwareaccelerated.It’s also the most radical change to hit Windows user interfaces since Windows 95. A standard Windows application relies on two well-worn parts of the Windows operating system to create its user interface: User32. This provides the familiar Windows look and an d feel for elements such as windows, buttons, text boxes, and so on. GDI/GDI+. This provides drawing support for rendering shapes, text, and images Sign up to vote on this title
at the cost of additional complexity (and often lackluster performance).
Useful
Not useful
The following are some of the most dramatic changes that WPF ushers into the Window programming world:
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
still will lead in that scenario. In case you are looking for light animation ( not game
programming ) WPF will be a choice. You can also express WPF using XML which is al
called as XAML.In other words WPF is a wrapper which is built over DirectX. So let’s le t’s de WPF.
What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP? •
•
•
•
•
•
•
•
•
XML Web services are more restricted than objects exposed o .NET Remoting. XML Web services support open standards that target cross platform use. XML Web services are generally easier to create and due to restricted nature of XML Web services, the design issues ar simplified. XML Web services support only SOAP message formatting, whic uses larger XML text messages. Communication with .NET Remoting can be faster than XML Web service communication with a binary formatter. XML Web services are designed for use between companies and organizations. XML Web services don't require a dedicated hosting program because they are always hosted by ASP.NET. Consumers can use XML Web services just as easily as they c download HTML pages from the Internet. Thus there's no need for an administrator to open additional ports on a firewall they work through MS-IIS and ASP.NET .NET Remoting isn't implemented with much concern for interoperability. Services implemented using .NET Remoting, even if they use an open standard like SOAP as th transport layer, cannot be consumed by non-.NET clients. Sign up to vote on this title
•
Advantages of Silver Light
•
It compel cross-platform user experiences.
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
(Silverlight v1.1). Lets not forget C# in the browser... We can have multiple XAML files in SIlverlight Project. SOme other main advantages:-
1)Development IDE :- The development IDE for Silverlight2 is Visual Studio 2008 Bar none, Microsoft has the best development IDE on the market. Whether you
programming are a C++, C or Java programmer, you will learn to envy Visual St 2008. A lot of the items that I will post below can have constructive arguments. However, this is one of the few that is iron clad. There simply is NO comparison between Visual Studio 2008 and Adobe Flex Builder3.
2).NET Framework & Languages (C#, VB.NET and dynamic languages):la nguages):- Silver
2 runs on a subset of the .NET 3.5 Framework. Therefore, it requires a the use o
a .NET based language. The two flagship languages in .NET are C# and VB.NE
Flex uses ActionScript. If you are a .NET/Microsoft development department, yo
already have the majority of the skills necessary to start developing in Silverlight
That is a huge advantage over Adobe's counterpart. Silverlight also supports wri applications in dynamic languages such as Iron Ruby.
3. Intergration with Enterprise based technologies:- Silverlight 2 integrates very w with other Enterprise Microsoft .NET based technologies. Silverlight 2 is not a
technology that is out there on its own fending for itself. Microsoft did a real good
integrating the technology with its other enterprise offerings. I am going to cover a couple biggies:
WCF:-The ability to use: WCF basicHttpBinding, duplex binding and WCF REST services is huge. WCF allows architects to create a first class Service Oriented
Architecture and it can be consumed by Silverlight clients. Adobe has nothing of etc. sort. Flash and Flex obviously can consume web services/REST services Sign up to vote on this title
However, the entire WCF framework gives Silverlight a big advantage Useful Not useful
LINQ:- Silverlight just like Flash/Flex are client side technologies. In the Web 2.0
days a good design is to minimize calls to the server and try to manipulate some
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
lined up to get one, even though the phone was lacking major mobile technology had been around for a couple years prior. Another example is VB.NET vs C#. VB.NET has always been looked as the red headed step child in .NET when compared to C#. C# has the perception of a more mature, professional and advanced language. This is where I think Silverlight has a huge
perception/marketing edge. For creating business applications app lications you will probably it a lot more developers, architects and dev managers rallying around and more comfortable with Silverlight rather than Flex.
5. Microsoft has Windows:-)Like it or not, Microsoft still controls 85%+ of the des
market. That percentage is even greater gre ater on business workstations. Even though Flash/Flex has a huge market lead now, Microsoft can simply put a monsterous
in it by releasing Silverlight 2 RTM as a hotfix, part of a Service Pack or part of th next Windows release. Microsoft can simply distribute the Silverlight 2 RIA
framework on a level no other company can. Many IT engineers will like Silverlig
since it is a Microsoft based technology. It will make it a lot easier to distribute to their employees.
6. Mesh:- Mesh right now is Microsoft's offering to sync up data between compu It uses Silverlight as the UI. Unless you have been sleeping under a rock, you probably have heard Microsoft tried to buy Yahoo multiple times and tried to
essentially buy their way into the search/advertising market. This is one area wh since 1995 both Web 1.0 and Web 2.0 have both passed Microsoft by. Mesh is going to be Microsoft's big splash into Web 3.0 and the semantic web/cloud
computing and allow them to compete with Google, Yahoo, FaceBook. What is g is that Silverlight is the UI for this huge "Internet 2" technology. •
•
Sign up to vote onand this title What is the difference di fference between between Finalize() Dispose useful Useful Notany Dispose() is called by as an indication for an object to release unmanaged
resources it has held.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
always cleaned up appropriately, a Dispose method should be callable multiple times without throwing an exception. •
A Dispose method should call the GC.SuppressFinalize method for the object it disposing. If the object is currently on the finalization queue, GC.SuppressFinalize GC.SuppressFinalizeprevents prevents its Finalize method from being called. Remember that executing a Finalize method is costly to performance. If Finalizemethod
your Dispose method has already done the work to clean up the object, then it i necessary for the garbage collector to call the object'sFinalize object'sFinalize method. •
A Finalize method should not throw exceptions, because they cannot be handled the application and can cause the application to terminate.
•
The garbage collector keeps track of objects that have Finalize methods, using
internal structure called the finalization queue. Each time your application create object that has a Finalize method, the garbage collector places an entry in the finalization queue that points to that object.
http://mvkr.blogspot.in/2010/07/oops-concepts-with-real-time-examples.html http://www.csharpcorner.com/UploadFile/tusharkantagarwal/objectorientedcsharp111620050 43AM/objectorientedcsharp.aspx http://renganathan1984.blogspot.in/ http://www.aspdotnet-suresh.com/2010/04/introduction-to-object-oriented.html http://manishagrahari.blogspot.in/2011/08/oops.html http://aspnettutorialonline.blogspot.com/2012/06/aspnet-c-sql-server-ajax Sign up to vote on this title interview.html
Useful
Not useful
http://dotnetguts.blogspot.in/2007/07/example-of-polymorphism-in-net.html
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Save
Embed
Share
Print
•
real time example in oops
Download
Join
Sheet Music •
•
•
•
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Polymorphism is one of the primary characteristics Polymorphism characteristics (concept) of ob oriented programming. Poly means many and morph means form. Thus, polymorphism re to being able to use many forms of a type without regard to details. Polymorphism is the characteristic of being able to assign a differ meaning specifically, to allow an entity such as a variable, a funct or an object to have more than one form. Polymorphism Polymor phism is the ability to process objects differently depend their data types. Polymorphism is the ability to redefine methods for derived classes.
Types of Polymorphism • •
Compile time Polymorphism Run time Polymorphism
Compile time Polymorphism • •
Compile time Polymorphism also known as method overloading Method overloading means having two or more methods with the sa name but with different signatures
Example of Compile time polymorphism
Sign up to vote on this title
Run time Polymorphism
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
Join
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Example of Polymorphism in .Net
What is Polymorphism? Polymorphism means same operation may behave differently on different classe Example of Compile Time Polymorphism: Method Overloading Example of Run of Run Time Polymorphism: Method Overriding Example of Compile Time Polymorphism Method Overloading - Method with same name but with different arguments is called method overloading. - Method Overloading forms compile-time polymorphism. - Example of Method Overloading: class A1 { void hello() { Console.WriteLine(“Hello”); }
void hello(string s) { Console.WriteLine(“Hello {0}”,s); } }
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
{ virtual void hello() { Console.WriteLine(“Hello from Parent”); } } Class child : parent { override void hello() { Console.WriteLine(“Hello from Child”); } } static void main() { parent objParent = new child(); objParent.hello(); } //Output Hello from Child.
Abstraction
What is an Abstraction? . Abstraction is thinking about something a certain way . Abstraction is the representation of only the essential features of an obje and hiding un essential features of an object. . Through Abstraction all relevant data can be hide in order to reduce complexity and increase efficiency . Abstraction is simplifying complex reality by modeling classes appropria Sign up to vote on this title to the problem Useful Not useful . Abstraction-outer layout, used in terms of design . Encapsulation protects abstraction. . It taking required data and hiding the unwanted data.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
In this above example abstraction shows only necessary details of ca shows only necessary details to drive a car like rear view mirror, gear, clu steering And hides internal detail of car like Piston, crankshaft, carburet gas turbines etc which is encapsulation for a
Abstraction shows only required data and hides unwanted data. Difference between Encapsulation and Abstractio Abstraction n 1. Abstraction solves the problem 1. Encapsulation solves the problem in t in the design level implementation level 2. Abstraction is used for hiding 2. Encapsulation means hiding th the e co the unwanted data and giving data in to a single unit to protect the da relevant data from outside world 3. Abstraction is a technique that 3. Encapsulation is the technique for helps to identify which specific packaging the information in such a way information should be visible and Sign up to vote on this title to hide what should be hidden, and mak which information should be Not visible whatisUseful intended touseful be visible. hidden.
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Magazines
News
Documents
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
Download
Join
of 29
use oops
Search document
In this above example abstraction shows only necessary details of ca shows only necessary details to drive a car like rear view mirror, gear, clu steering And hides internal detail of car like Piston, crankshaft, carburet gas turbines etc which is encapsulation for a car Abstraction shows only required data and hides unwanted data .
In above example which shows encapsulated detail of a car which is necessary to expose to outside world and make visible what is intende be visible. Encapsulation What is Encapsulation? •
•
•
Encapsulation is one of the fundamental principles of object-orien Sign up to vote on this title programming. Encapsulation is a process of hiding all the internal details Useful useful of an ob Not from the outside world Encapsulation is the ability to hide its data and methods from out
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Save
Embed
Share
Print
•
real time example in oops
Download
Join
Sheet Music •
•
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Encapsulation is the technique or process of making the fields class private and providing access to the fields using public method Encapsulation gives you the ability to validate the values before object user change or obtain the value Encapsulation Encapsulat ion allows us to create a "black box" and protects an obj internal state from corruption by its clients.
Two ways to create a validation process. •
•
Using Accessors and Mutators
Using properties
In th this is exa examp mple le _em _emplo ployee yeeid id an and d _sa _salar lary y is pr priva ivate te field fields s an and d prov prov access to the fields using public me (SetEmployeeID,GetEmployeeID,SetSalary,GetSalary) Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Magazines
News
Documents •
Sheet Music
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
Download
Join
of 29
use oops
Search document
A class can change da data ta ty type pe of its fields anytime but users of class do not need to change any code
Inheritance
What is Inheritance? Inheritance, together with encapsulation and polymorphism, is one of the three primary characteristics (concept) of object-oriented programming Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes The Class whose methods and variables are defined is called super class or base class The Class that inherits methods and variables are defined is called sub class o derived class Sometimes base class known as generalized class and deriv class known as specialized class Keyword to declare inheritance is ":" (col in visual C#. Benefits of using Inheritance
Once a behavior (method) or property is defined in a super class(base class),that behavior or property is automatically inherited by all subclasses (derived class). Code reusability increased through inheritance Inheritance provide a clear model structure which is easy to understand without much complexity Using inheritance, classes become grouped together in a hierarchical tree structure Code are easy to manage and divided into parent and child classes Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Save
Embed
Share
Print
•
Sheet Music
real time example in oops
Download
Join
•
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Implementation Inheritance Multiple Inheritances (Interface Inheritance)
Implementation Inheritance Implementation One base class (super class) and one derived class (sub class). Example:
Interface Inheritance An interface looks like a class, but has no implementation. It contains definitions of events, indexers, methods and properties. An interface inherited by classes An interface inheritance defined with keyword "interface". In C# Interface Inheritance also known as multiple inheritance Inheritance Tree Structure:
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Magazines
News
Documents •
Sheet Music • • • •
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
Download
Join
of 29
use oops
Search document
Class is the general thing and object is the specialization of gen thing Objects are instance of classes. Declaration of an Object in C#.NET ClassName objectName=new ClassName(); E.g.: Person objPerson= new Person();
An object is characterized by concepts like: • • •
Attribute Behavior Identity
1. What is an Attribute? • •
•
Attributes define the characteristics of a class. Attributes The set of values values of an attribute attribute of a particular particular object object is called its its st
In Class Program attribute can be a string or it can b integer
2. What is a Behavior? • • •
Every object has behavior In C#, behaviors of objects are written in methods. If a behavior of an object needs to be performed, the corresponding method is called.
3. What is an Identity? • •
Sign up to vote on this title
Useful Not useful identity Each time an object is created the object is been defined. This identity is usually usually created using an identifier identifier which is derived f the type of item
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Upload
Sign In
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
Many beginners very confused with these two terms. Here I am giving the b difference between the Web Farm and Web Garden.
Web Farm
After developing developing our asp.net asp.net web applicati application on we host it on IIS Server. Server. Now standalone server is sufficient to process ASP.NET Request and response for a s web sites but when the site comes for big organization where there an million daily user hits then we need to host the sites on multiple Server. This is called farms. Where single site hosted on multiple IIS Server and they are running be the Load Balancer.
Fig : General Web Farm Architecture Sign up to vote on this title
This is the most common scenarios for any web based production environment. Useful Not useful Where Client will hit an Virtual IP ( vIP) . Which is the IP address of Load Balanc When Load balancer received the request based on the server load it will redirec
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
5.8K views
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks
real time example in oops
Save
Embed
Share
Print
Download
Magazines
News
Documents
Sheet Music
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
There are some Certain Restriction to use Web Garden with your web application we use Session Mode to "in proc", our application will not work correctly becaus session will be handled by different Worker Process. For Avoid this Type of prob we should have to use Session Mode "out proc" and we can use "Session State Server" or "SQL-Server Session State".
How To Configure Web Garden? Right Click on Application Pool > Properties > GoTo Performance Tab In bottom Group Section Increase the Worker Process Count.
Further Study
Sign up to vote on this title
Useful
Not useful
1. http://www.codeproject.com/KB/aspnet/ExploringIIS.aspx
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
5.8K views
0
Sign In
Upload
RELATED TITLES
0
real time example in oops Uploaded by Mano Haran
Top Charts
Books
Audiobooks Magazines
News
Documents
Sheet Music
real time example in oops
Save
Embed
Share
Print
Download
Join
Core Java Oops Concepts Important JAVA Inheritance , Abstraction, Programs
1
of 29
use oops
Search document
We can implement web farms in .NET. O pen web.config file and add mode options. i) if mode=inproc (non web farm but fast when you have very few customers). ii) if mode=StateServ mode=StateServer er (for web farm) iii) if mode=SqlServer (for web farm) Whether to use option (ii) or (iii) depends on situation. StateServer is faster but SqlServ more reliable and used for critical applications.
Web Garden: Garden: It is a multi-processor setup i.e. in case of a web garden we have a one server having more than one processor. You can use web gardens in .Net as: Open web.config file and add webGarden = true in processmodel tag.
Web-garden - An IIS6.0 feature where you can configure an application pool as a webgarden and also specify the number of worker processes for that pool. It can help improve performance in some cases.
Web-farm - a general term referring to a cluster of physically separate machines, machines, each running a web-server for scalability and performance (contrast this with web-garden which refers to multiple processes on one single physical machine).
Sign up to vote on this title
Useful
Not useful
Home
Saved
Top Charts
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join