-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction_vehicle.php
More file actions
31 lines (28 loc) · 798 Bytes
/
Copy pathaction_vehicle.php
File metadata and controls
31 lines (28 loc) · 798 Bytes
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
<?php
class Vehicle{
private $vehicle_type;
private $vehicle_num ;
#constructor
function __construct($vehicle_type = "Van", $vehicle_num = "b-888") {
$this->$vehicle_type=$vehicle_type;
$this->$vehicle_num = $vehicle_num;
}
function set_vehicle_type($v_type) {
$this->vehicle_type = $v_type;
}
function set_vehicle_num($v_number) {
$this->vehicle_num = $v_number;
}
function get_vehicle_type() {
return $this->vehicle_type;
}
function get_vehicle_num() {
return $this->vehicle_num;
}
}
// $vehicle = new Vehicle();
// $vehicle->set_vehicle_type("Bus");
// $vehicle->set_vehicle_num("b-457");
// echo $vehicle ->get_vehicle_type();
// echo $vehicle ->get_vehicle_num();
?>