forked from maheshashokit/27_Java_Full_Stack_Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrainer.java
More file actions
23 lines (19 loc) · 683 Bytes
/
Trainer.java
File metadata and controls
23 lines (19 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class Trainer extends Person{
public int trainerId;
public String domain;
public float experience;
//Defining the constructors
public Trainer() {
System.out.println("Public Constructor for Trainer Class");
}
public Trainer(int trainerId, String domain, float experience) {
System.out.println("Pubic Parameter Constructor from Trainer Class...");
this.trainerId = trainerId;
this.domain = domain;
this.experience = experience;
}
public void displayTrainerDetails() {
System.out.println("*********Trainer Information********************");
System.out.println("TrainerID ::" + trainerId + " Domain ::" + domain + " Experience ::" + experience);
}
}