-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.php
More file actions
70 lines (68 loc) · 1.41 KB
/
Copy pathmain.php
File metadata and controls
70 lines (68 loc) · 1.41 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* Created by PhpStorm.
* User: javi
* Date: 5/10/15
* Time: 18:13
*/
require_once __DIR__ . "/vendor/autoload.php";
use Com\Iesebre\Dam2\max\Persons;
use Com\Iesebre\Dam2\max\Curriculum;
/*
* Persona
*/
$person = new Persons\Person("persona");
$person->setGivenName("Palomo");
$person->render();
/*
* Estudiant que fa dual.
*/
$student1 = new Persons\Student(true);
$student1->setGivenName("Jose");
$student1->setSalary(600);
$student1->render();
/*
* Estudiant que NO fa dual.
*/
$student2 = new Persons\Student();
$student2->setGivenName("Marc");
$student2->render();
/*
* Professor
*/
$teacher = new Persons\Teacher();
$teacher->setGivenName("Sergi Tur");
$teacher->setSalary(2000);
$teacher->render();
/*
* Estudi
*/
$study = new Curriculum\Study("DAM", "Informatica");
$study->render();
/*
* Curs
*/
$course = new Curriculum\Course("2n", $study);
$course->render();
/*
* Modul professional
*/
$studyModule = new Curriculum\StudyModule("Programacio d'interficies", $teacher, $course);
$studyModule->render();
/*
* UF
*/
$studySubModule = new Curriculum\StudySubModule("UF1", 50, $studyModule);
$studySubModule->render();
/*
* Classe
*/
$students = [];
$classroomGroup = new Curriculum\ClassroomGroup($students);
$classroomGroup->addStudent($student1);
$classroomGroup->addStudent($student2);
/*
* Lliço
*/
$leason = new Curriculum\Leason("PHP", $studySubModule, $classroomGroup);
$leason->render();