//Application of single inheritance
class base
{
int l;
int b;
base (int x, int y)
{
l = x;
b = y;
}
int area ( )
{
return (l * b);
}
}
class derive extends base / /Inheriting Room
{
int h;
derive (int x, int y, int z)
{
super (x,y); //pass values to superclass
h = z;
}
int volume ()
{
return (l * b * h);
}
}
class mainInherit
{
public static void main (String args [ ])
{
derive obj1 = new derive ( 44,72,90);
int area1 = obj1.area( ); / /superclass method
int volume1= obj1.volume ( ); / / baseclass method

System.out.println (“Area1 = “+ area1);
System.out.println (“Volume1 = “+ volume1);
}
}

Home      |      About Us      |     Portfolio      |      Services      |      Courses      |     Career      |      Cost      |      Contact Us
Services
  SEO   
  Link Building
  Data Entry
  Web Design and development
  Web Application development
 

Graphic and multimedia

  E-Commerce Solutions
  Software development
  Web Marketing & Promoting
  Internet Marketing
  IT Outsourcing
  Multimedia/CD Presentation
  Synopsis Ideas
  Project Ideas
  Placement Papers
  Live Project Training
  Programming & Projects
  Faq
  Training @balujalabs
 
 
Method
 

Application of Super ( ) In Inheritance

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1

Program To Demonstrate

2

Application of Single Inheritance

3 Application of Super ( ) In Inheritance.
4 Use Of Constrictors in Constrictors in
5

To Demonstrate Method Oveiloediey

6

Differentiate Accers Modifiers.