Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 65

5 marks

Computer ScienceISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024)Case basedInheritance, Interfaces and Polymorphism

Answer the following questions.

Fix the following keywords at the right places: extends, super, protected, abstract, implements…

Fix the following keywords at the right places: extends, super, protected, abstract, implements
(a)[1]
class D1 ______ i1, i2            
{              
}
(b)[1]
_________ void printInfo( );
(c)[1]
class S1 
{             
} 
class D2 ______ S1 
{             
}
(d)[1]
class S2 
{ 
    public void show( ) 
    {       
    } 
} 
class D3 extends S2 
{ 
    public void show( ) 
    { 
        ____.show( );                        
    } 
}
(e)[1]
// Package X
class S3 {
    ______ int data;
}

// Package Y
class D4 extends S3 {
    public void calc() {
        data = 120 * 3;
    }
}

Answer

Answer (a)

Blanks: implements

implements

Answer (b)

Blanks: abstract

abstract

Answer (c)

Blanks: extends

extends

Answer (d)

Blanks: super

super

Answer (e)

Blanks: protected

protected