File tree Expand file tree Collapse file tree 3 files changed +12
-22
lines changed
3.JavaMultithreading/src/com/javarush/task/task29/task2909/human Expand file tree Collapse file tree 3 files changed +12
-22
lines changed Original file line number Diff line number Diff line change 44import java .util .Collections ;
55import java .util .List ;
66
7- public class Human {
7+ public class Human implements Alive {
88 public static int nextId = 0 ;
99 private int id ;
1010 protected int age ;
1111 protected String name ;
12- protected int course ;
1312
1413 protected int [] size ;
1514
@@ -50,9 +49,6 @@ public void setName(String name) {
5049 this .name = name ;
5150 }
5251
53- public int getCourse () {
54- return course ;
55- }
5652
5753 public List <Human > getChildren () {
5854 return Collections .unmodifiableList (children );
@@ -77,11 +73,6 @@ public Human(String name, int age) {
7773 this .name = name ;
7874 }
7975
80- public void live () {
81- // if (isSoldier)
82- // fight();
83- }
84-
8576 public int getId () {
8677 return id ;
8778 }
@@ -93,4 +84,9 @@ public void setId(int id) {
9384 public void printSize () {
9485 System .out .println ("Рост: " + size [0 ] + " Вес: " + size [1 ]);
9586 }
87+
88+ @ Override
89+ public void live () {
90+
91+ }
9692}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ public class Student extends Human {
88 private String university ;
99 private Date beginningOfSession ;
1010 private Date endOfSession ;
11+ private int course ;
1112
1213 public Student (String name , int age , double averageGrade ) {
1314 super (name , age );
@@ -68,4 +69,9 @@ public double getAverageGrade() {
6869
6970 public void fight () {
7071 }
72+
73+ public int getCourse () {
74+ return course ;
75+ }
76+
7177}
You can’t perform that action at this time.
0 commit comments