GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Certification  >  Microsoft
Go To First  |  Previous Question  |  Next Question 
 Microsoft  |  Question 10 of 28    Print  
how we can manipulate multiple inheritance using interfaces. please show me with examle code

  
Total Answers and Comments: 1 Last Update: March 20, 2006     Asked by: karanam nagasekhar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 20, 2006 01:03:47   #1  
       

RE: how we can manipulate multiple inheritance using ...

multiple inheritance can be manipulated by using interfaces

INTERFACE:

interface is a method which can be created but can not be defined (coding)i.e,methods or interfaces can be defined and the implementation of methods or interfaces can be done in classes.

example:

imports system.console

sub main()

dim obj as new rain()  /* create an object for a class to call  a                   

obj.display()                                              method*/

obj.display1()

end sub

public Interface wind()

sub disaplay()

write("interface is created")

end Interface

public Interface ABC()

sub display1()

write("second interface")

end Interface

public class rain() implements wind(),ABC() /*"implements" keyword is used 

                                                                to implement the interface*/

                                                                    

                                                                 

public sub display implements wind.display()

write("interface wind is defined here")

end sub

end class

example 2:

imports system.console

sub main()

dim obj as new tot()

obj.setdata()

obj.display()

obj.r1()

obj.display()

obj.r2()

obj.display()

obj.r3()

obj.display()

obj.r4()

obj.display()

end sub

public Interface one()

sub r1()

sub r2()

end Interface

public Interface two()

sub r3()

sub r4()

end Interface

public class tot () implements one(),two()

dim i as integer

dim j as integer

dim sum as integer

sub setdata()

i=3

j=2

sum=0

end sub

public sub r1() implements one.r1 

sum=i+j

end sub

public sub r2() implements one.r2

sum=i-j

end sub

sub display()

write("sum")

end sub

public sub r4() implements two.r4

sum=i*j

end sub

public sub r3() implements two.r3

sum=i*j/2

end sub

end class


 
Is this answer useful? Yes | No

 Related Questions

 Sponsored Links

 
Related Articles

ODP.NET - Retrieving Multiple Rows on to the Grid

ODP NET Retrieving Multiple Rows on to the Grid In the previous section we tried to retrieve only one row using OracleDataReader In this section we will try to retrieve more than one row or a result set and populate a DataGridView on a WinForm mosgoogle The following code lists out the details of al
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php" document ready function var highlighted
 

jQuery Interacting with Other Code

jQuery Interacting with Other Code We learned with our sorting and paging code that we can t treat the various features we write as islands The behaviors we build can interact in sometimes surprising ways; for this reason it is worth revisiting our earlier efforts to examine how they coexist with t
 

jQuery Completed sorting and paging code

Learning jQuery The Finished Code The completed sorting and paging code in its entirety follows mosgoogle geshibot lang php" fn alternateRowColors function tbody tr odd this removeClass even addClass odd ; tbody tr even this removeClass odd addClass even ; return this; ; document
 

code

geshibot lang javascript" head This is a JS snippet from Geshi Bot" Replaces the geshi default classes with mambo joomla classes function replaceGeshiWithMamboClasses if document document getElementsByTagName Category
 

Microsoft AJAX Library - Inheritance using Prototypes

Inheritance using Prototypes Once again prototyping can help us implement an OOP feature in a more elegant way than when using closures Prototype based inheritance makes use of the behavior of JavaScript prototypes When accessing a member of a function that member will be looked for in the function
 

Microsoft AJAX Library - Inheritance using Closures

Inheritance using Closures and Prototypes There are two significant techniques for implementing the OOP concept of inheritance with JavaScript code The first technique uses closures and the other technique makes use of a feature of the language named prototyping Early implementations of the Microsof
 

SOA Definitions and Certification

SOA Definitions and Certification Service Oriented Architecture is a design that enables Business and computational resources to be linked together on demand as a means of achieving the results desired for service consumers which may be end users or other services Service Oriented Architecture has
 

C++ Inheritance

C Inheritance Introduction What is Inheritance Inheritance is the process by which new classes called derived classes are created from existing classes called base classes The derived classes have all the features of the base class and the programmer can choose to add new features specific to the ne
 

Tips for Oracle Certification

Getting an Oracle certification is reliable credential recognized by industries that can accelerate professional development and their productivity. So this article provides some tips for getting this oracle certification.  First one must plan well to allocate their time for prepari
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape