forked from ahmadjumadi/materi-php-oop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathape.php
66 lines (58 loc) · 1.27 KB
/
ape.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
<?php
class Ape
{
// Properties
public $Name;
public $Legs;
public $Cold_Blooded;
public $Yell;
// Methods
function __construct($Name, $Legs, $Cold_Blooded, $Yell)
{
$this->Name
= $Name
;
$this->Legs = $Legs;
$this->cold_blood = $Cold_Blooded;
$this->Yell = $Yell;
}
function get_Name()
{
return $this->Name
;
}
function set_Legs($Legs)
{
$this->Legs = $Legs;
}
function get_Legs()
{
return $this->Legs;
}
function set_Cold_blooded($Cold_Blooded)
{
$this->Cold_Blooded = $Cold_Blooded;
}
function get_Cold_blooded()
{
return $this->Cold_Blooded;
}
function set_yell($Yell)
{
$this->Yell = $Yell;
}
function get_yell()
{
return $this->Yell;
}
}
$Ape = new Animal("Monyeettttt", "4", "Cold_blooded", "UU aa uu AA");
echo "<strong>Name :</strong>" . $Ape->get_Name();
echo "<br>";
echo "<strong>Legs :</strong> " . $Ape->get_Legs();
echo "<br>";
echo "<strong>Cold Blooded :</strong> " . $Ape->get_Cold_blooded(), "No";
echo "<br>";
echo "<strong>Yell :</strong> " . $Ape->get_yell();
echo "<br>";
?>