-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
52 lines (42 loc) · 1.13 KB
/
index.php
File metadata and controls
52 lines (42 loc) · 1.13 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
<?php
require_once 'Model/Entreprise.php';
require_once 'Model/Personne.php';
require_once 'Model/Voiture.php';
require_once 'Model/Marque.php';
require_once 'Model/Location.php';
$peugeot = new Marque('Peugeot');
$audi = new Marque('Audi');
$vehicule = new Voiture($peugeot, '308', 2019);
$vehicule
->setImmatriculation("BS768XR")
->setPoids(1320)
->setConsommation(10)
->setPuissance(270)
->setNombreDePortes(4);
$vehicule2 = new Voiture($audi, 'A1', 2011);
$vehicule2
->setPoids(1040)
->setImmatriculation('TR800BS')
->setPuissance(105)
->setConsommation(5)
->setNombreDePortes(2);
$client1 = new Personne();
$client1
->setIdentifiant('18212121')
->setNom('Martins-Jacquelot')
->setPrenom('Jeff')
->setAdresse('10 rue de la mere de maxime ROUGET');
$client2 = new Entreprise();
$client2
->setIdentifiant('7HBRR')
->setNom('Livequestion');
$location1 = new Location();
$location1
->setClient($client1)
->setVehicule($vehicule);
$location2 = new Location();
$location2
->setClient($client2)
->setVehicule($vehicule2);
var_dump ($location1);
var_dump ($location2);