Skip to content

Commit cc01d16

Browse files
Implementing class
1 parent 3d9d363 commit cc01d16

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

ActorSivakumar.java

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
class ActorSivakumar implements Actor
2+
{
3+
static String address = "coimbatore";
4+
int age;
5+
String car_name;
6+
ActorSivakumar()
7+
{
8+
System.out.println("Senior actor from actor interface");
9+
}
10+
11+
ActorSivakumar(int age, String car_name)
12+
{
13+
this.age = age;
14+
this.car_name = car_name;
15+
}
16+
public void speaking()
17+
{
18+
System.out.println("He speaks kongu tamil well");
19+
}
20+
public void dance()
21+
{
22+
System.out.println("He dances classical dance well");
23+
}
24+
public void act()
25+
{
26+
System.out.println("He act commercial films");
27+
}
28+
public void sing()
29+
{
30+
System.out.println("He is carnatic singer");
31+
}
32+
33+
public static void main ( String args[])
34+
{
35+
ActorSivakumar suryaDad = new ActorSivakumar(65,"Audi car");
36+
suryaDad.speaking();
37+
suryaDad.dance();
38+
suryaDad.act();
39+
suryaDad.sing();
40+
System.out.println("is makeup needed? "+suryaDad.makeUpRequired);
41+
System.out.println("Age= "+suryaDad.age +" "+"address= "+suryaDad.address +" "+ "car_name= "+suryaDad.car_name);
42+
Actor senior = new ActorSivakumar();
43+
//senior.speaking();
44+
senior.dance();
45+
senior.act();
46+
senior.sing();
47+
System.out.println("is makeup needed"+senior.makeUpRequired);
48+
System.out.println("Address= "+senior.address);
49+
//System.out.println("Age= "+senior.age +" "+"address= "+senior.address +" "+ "car_name= "+senior.car_name);
50+
}
51+
}
52+
53+
54+
55+
56+

0 commit comments

Comments
 (0)