244(1)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

ASSIGNMENT 4

SOURCE CODE:
//Name:SAITEJA
//Roll no-2211CS020244
//AIML-GAMMA
class Animal {
void walk() {
System.out.println("I am walking");
}
}

class Bird extends Animal {


void fly() {
System.out.println("I am flying");
}

void sing() {
System.out.println("I am singing");
}
}

class Solution {
public static void main(String[] args) {
Bird bird = new Bird();
bird.walk();
bird.fly();
bird.sing();
}
}

EXECUTION:

You might also like