-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCourse.php
executable file
·90 lines (78 loc) · 1.44 KB
/
Course.php
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
80
81
82
83
84
85
86
87
88
89
90
<?php
declare(strict_types = 1);
class Course
{
private $name;
private $fullName;
private $hours;
private $credit;
private $inst;
/**
* @return mixed
*/
public function getInst()
{
return $this->inst;
}
/**
* @param String $inst
*/
public function setInst($inst)
{
$this->inst = $inst;
}
/**
* @return int
*/
public function getCredit()
{
return $this->credit;
}
/**
* @param int $credit
*/
public function setCredit($credit)
{
$this->credit = $credit;
}
/**
* @return mixed
*/
public function getName(): String
{
return $this->name;
}
/**
* @return mixed
*/
public function getFullName()
{
return $this->fullName;
}
/**
* @return array
*/
public function getHours(): array
{
return $this->hours;
}
/**
* @param array $hours
*/
public function setHours(array $hours)
{
$this->hours = $hours;
}
public function addHour(int $hour)
{
$this->hours[] = $hour;
}
public function __construct(String $name, array $hours = null, int $credit = null, $fullName = null, $inst = null)
{
$this->name = $name;
$this->fullName = $fullName;
$this->hours = $hours;
$this->credit = $credit;
$this->inst = $inst;
}
}