-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.java
More file actions
79 lines (64 loc) · 1.82 KB
/
Person.java
File metadata and controls
79 lines (64 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import java.util.ArrayList;
/**
*Η κλάση Person παριστά ένα άτομο και περιλαμβάνει τα κοινά στοιχεία φοιτητών και καθηγητών τα οποία κληρονομούνται από τις αντίστοιχες κλάσεις
*
*/
public class Person
{
protected String PersonName;
protected String PersonSurname;
protected String PersonEmail;
protected String PersonContactno;
protected ArrayList <Course> Courses;
public Person(String PersonName, String PersonSurname, String PersonEmail, String PersonContactno)
{
this.PersonName = PersonName;
this.PersonSurname = PersonSurname;
this.PersonEmail = PersonEmail;
this.PersonContactno = PersonContactno;
Courses = new ArrayList();
}
public Person() {
}
//getters & setters
public String getPersonName ()
{
return PersonName;
}
public void setPersonName (String PersonName)
{
this.PersonName = PersonName;
}
public String getPersonSurname ()
{
return PersonSurname;
}
public void setPersonSurname (String PersonSurname)
{
this.PersonSurname= PersonSurname;
}
public String getPersonEmail ()
{
return PersonEmail;
}
public void setPersonEmail (String Email)
{
this.PersonEmail = Email;
}
public String getPersonContactno ()
{
return PersonContactno;
}
public void setPersonContactno (String Phone)
{
this.PersonContactno = Phone;
}
public ArrayList<Course> getCourses ()
{
return Courses;
}
public void setCourses(ArrayList<Course>Courses)
{
this.Courses =Courses;
}
}