-
Notifications
You must be signed in to change notification settings - Fork 0
/
classes.php
71 lines (53 loc) · 996 Bytes
/
classes.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
<?php
class Person
{
Private $firstName;
Private $lastName;
Private $userName;
Private $password;
public function getfirstName($fn){
$this->firstName = $fn;
}
public function getLastName($ln){
$this->lastName = $ln;
}
public function getUserName($un){
$this->userName = $un;
}
public function getPassword($pw){
$this->password = $pw;
}
public function putfirstName(){
return $this->firstName;
}
public function putLastName(){
return $this->LastName;
}
public function putUserName(){
return $this->userName;
}
public function putPassword(){
return $this->password;
}
public function display(){
return $this->firstName." ".$this->lastName;
}
}
class student extends Person
{
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$nw = new Person();
$nw->getfirstName("Adeola");
$nw->getLastName("Ifeoluwa");
echo $nw->display();
?>
</body>
</html>