In regard of internet programming, explain concept of polymorphism & inheritance with example?
82220
Checkout the link below:\nhttp://www.brpreiss.com/books/opus5/html/page603.html
98158
OOP languages have extra language features - e.g. encapsulation, polymorphism, and inheritance are object behaviours that don't have a direct procedural equivalent.\n\nFor making setup files, there are commercial solutions like InstallShield, but for free, consider NSIS: http://nsis.sourceforge.net/Main_Page
203981
http://en.wikipedia.org/wiki/Aspect_oriented_programming\n\nWikipedia wins again!
781094
Nobody is going to do your homework for you. \n\nIf you're supposed to write code examples that illustrate how two comparable programs might look, then do this. Write some simple programs in C, and then re-write the same program in C++ but put the functions your void main calls in a class and instantiate the class.
595133
A class is a data type that encapsulates data and operations on data in a single unit. Before object-oriented programming, data and operations (functions) were treated as separate elements. An object is an instance of a class. That is, it is a value whose type is a class. The term object is often used more loosely in this documentation and where the distinction between a class and an instance of the class is not important, the term "object" may also refer to a class.\n\nYou can begin to understand objects if you understand Pascal records or structures in C. Records are made of up fields that contain data, where each field has its own type. Records make it easy to refer to a collection of varied data elements.\n\nObjects are also collections of data elements. But objects--unlike records--contain procedures and functions that operate on their data. These procedures and functions are called methods.\n\nAn object's data elements are accessed through properties. The properties of many Delphi objects have values that you can change at design time without writing code. If you want a property value to change at runtime, you need to write only a small amount of code. \n\nThe combination of data and functionality in a single unit is called encapsulation. In addition to encapsulation, object-oriented programming is characterized by inheritance and polymorphism. Inheritance means that objects derive functionality from other objects (called ancestors); objects can modify their inherited behavior. Polymorphism means that different objects derived from the same ancestor support the same method and property interfaces, which often can be called interchangeably.
387746
Briefly, there are Anonymous Methods, Iterators, Partial Classes, and Generics. I think Generics is the best new feature in C# 2.0 because it gives you more flexibility (like templates in C++) and it's a lot easier to share the same code for many different tasks.
254565
If you've never used an object-oriented language before, you need to understand the underlying concepts before beginning to write code. You need to know what an object is, what a class is, how objects and classes are related, and how objects communicate by using messages.\n\nObject-oriented programming. Objects of the program interact by sending messages to each other.\n\nWhat Is an Object? (in the Learning the Java Language trail)\n\n    An object is a software bundle of related variables and methods. Software objects are often used to model real-world objects you find in everyday life. \n\nWhat Is a Message? (in the Learning the Java Language trail)\n\n    Software objects interact and communicate with each other using messages. \n\nWhat Is a Class? (in the Learning the Java Language trail)\n\n    A class is a blueprint or prototype that defines the variables and the methods common to all objects of a certain kind. \n\nWhat Is Inheritance? (in the Learning the Java Language trail)\n\n    A class inherits state and behavior from its superclass. Inheritance provides a powerful and natural mechanism for organizing and structuring software programs. \n\nWhat Is an Interface? (in the Learning the Java Language trail)\n\n    An interface is a contract in the form of a collection of method and constant declarations. When a class implements an interface, it promises to implement all of the methods declared in that interface. \n\nHow Do These Concepts Translate into Code? (in the Learning the Java Language trail)\n\n    This section looks at a small applet, and shows you the code that creates objects, implements classes, sends messages, establishes a superclass, and implements an interface.\n\nfor the importance part\n\nObject-oriented programming is claimed to give more flexibility, easing changes to programs, and is widely popular in large-scale software engineering. Furthermore, proponents of OOP claim that OOP is easier to learn for those new to computer programming than previous approaches, and that the OOP approach is often simpler to develop and to maintain, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than other programming methods. Translation from real-world phenomena/objects (and conversely) is eased because there is direct mapping from the real-world to the object-oriented program (generally a many-to-one). The converse mapping, from the object-oriented program back to the real-world, is by way of a one-to-many mapping, where each 'many' is seen to be a collection of well-defined subsets (or superset), which together compose a real-world object. The corresponding object defined in the program may be seen as representing some proper subset of the real-world object's features.
528808
It purely depends upon the programming language u use\n\nThe following is in C#\nThread.CurrentThread.Name = "Main thread";\nClass1 obj = new Class1();\nThread thread = new Thread(\nnew ThreadStart(obj.ThreadStart));\nthread.Name = "Forked thread";\n\nNow in Java\nJava's creators have graciously designed two ways of creating threads: implementing an interface and extending a class. Extending a class is the way Java inherits methods and variables from a parent class. In this case, one can only extend or inherit from a single parent class. This limitation within Java can be overcome by implementing interfaces, which is the most common way to create threads\nthread.Start();\n\nimport java.lang.*;\npublic class Counter extends Thread \n{                      \n        public void run()                       \n        {              \n        ....            \n        }\n}\n\nand\n\nimport java.lang.*;\npublic class Counter implements Runnable\n{\n        Thread T;                        \n        public void run()                       \n        {                              \n        ....            \n        }\n}
464961
As and example, instead of having to write every function you might need you can call functions using the interface provide by an  API. Assuming you can find an API that does what you want.\n\n\nAn application programming interface (API) is the interface that a computer system, library or application provides in order to allow requests for service to be made of it by other computer programs, and/or to allow data to be exchanged between them
105117
Basically, you have one structure with some functions definitions and/or variables.  Then you make another structure that inherits the functions and varaibles from the 1st structure.  This new struture can have new variables and functions as well.  Some of this is language dependent.
1134809
http://www.dcs.bbk.ac.uk/~niki/lecture7.ppt\n\nhttp://www.cs.wpi.edu/~gpollice/cs4233-a05/CourseNotes/pdf/CS4233%20Class%204.pdf
599192
In the object oriented world of thinking you have objects that are made of classes. These classes can be ordered through a special inheritance relationship into hierarchies of parent/child relationships. \n\nUpcasting means taking a reference to an object and changing\nits type to that of any of its parent classes. (for java, add to this list also all the interfaces that any of the parent classes may be implementing)\n\nFor example:\nclass A extends B{\n}\nclass B{\n}\nclass Program{\n\n    .......\n    B b = new B();\n    A a = (A) b; // this is upcasting!\n    .......\n}\n\nUpcasting in java is implicit. This means that you dont need\nthe preceding parenthesis with the upcasting type.\n    A a = b;\nwould have equally worked. This is because you are going from something specific (class B - child) to something more general (class A - parent) and the java compiler can infer this fact by its design.\n\nDowncasting is the opposite:\n    .......\n    A a = new B(); //here you have an object from class B\n                   //referenced to a variable of class A\n                   //Implicit upcasting happens here.\n\n    B b = (B) a; // this is downcasting.\n\nDowncasting must be explicit. If you try to downcast an\nobject to a type that cant be downcasted to, then the compiler will offer protection by giving you an error.\nOtherwise your program would have crashed at runtime.\n\nYou can test with the operator instanceOf whether a \ndowncast is safe.\nexample:\n   if (a instanceOf (B)) { \n        b = (B)a;\n   }\n\nThe problem with this is that it creates a dependency in that segment of code and the type B. If in the future you create sibling to B classes you will have to remember to change all the places where you are checking with "instanceOf" and this can be a try nightmare on a large system.\n\nSo, generally speaking, you want to create code that avoids downcasting. This is not always possible and not always a good idea as there are many cases where explicit downcasting is needed or at least is possible to use without problems. \nAgain generally speaking, you want to create designs that have parts that are as independent, decoupled, reusable, robust, modular, and change adaptive as possible. This is not easy because many of these forces lead you to contradictions. So its all about making choices.\n\nfor an easy visual guide to java have a look at an online tutorial that I have recently added to: http://www.thanassis.com/java/index.htm
891794
Take a look at this website.  These guys give some very good tutorials in programming.  They do a lot in ASP.NET.
556841
Try Planet Source Code. Below are 52 examples (You probably should do your own homework, however...):\n\nhttp://www.planetsourcecode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&optSort=Alphabetical&txtCriteria=Binary+Tree&lngWId=3
52791
C) ABC, somthing1, something2 must be interface for the expression to be legal.\n\nThough java doesn't supports multiple inheritence for class, an interface can extend as many interface as needed. You can try compiling. But there is also a reason behind it.\nJava does not supports multiple inheritence because in diamond inheritence ( B and C extends A and D extends both B and C) it can cause ambiguity( as two copies of members of A would present in D).\nThis is not so for interface as there can't be ambiguity as all refer to same copy. So Java supports multiple inheritence for Inetrface
692349
Thinking in C++/ Thinking in Java/ And PHP Power Programming. I've read them. Those are the best ones...
50295
Java does not support multiple inheritence but it does not cause it loose any functionality rather aviod many confusion and problem. Let me explain,\nThere is two case when you need multiple inheritence, \nOne you want to inherit many sets of attribute.\nIt can easily done by interface.\nOther may be you really need multiple inheritance.\nThis case are rare and many time because of poor design and not able to understand whether B is A or B has a A. Or it can easily redesigned as B has A.\nfor example rather talking a worker is both phone operator and receptionist, the worker has both telephone operator and receptionist rule. Many time this can be one by members.