Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. <?php
  2. require_once("class_dates.php");
  3. require_once("class_address.php");
  4. require_once("class_phone.php");
  5. require_once("class_students.php");
  6. require_once("class_locals.php");
  7. require_once("class_internationals.php");
  8. require_once("class_loan.php");
  9. require_once("class_selffunded.php");
  10. require_once("class_extendedpayment.php");
  11. require_once("class_extendedpaymentinternationals.php");
  12. require_once("class_quaterlylocals.php");
  13. require_once("class_quaterlyinternationals.php");
  14. require_once("class_quaterlylocals.php");
  15. require_once("class_monthlylocals.php");
  16. require_once("class_monthlyinternationals.php");
  17. require_once("header.php");
  18.  
  19. //Creating all the objects in the same array: $Student[]
  20. try{
  21. $Student[] = new Loan('Anne', 'Thompson', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12',
  22. '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St', 'IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 4500);
  23. $Student[] = new ExtendedPayment('Marta', 'Doe', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12', '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St','IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 4500, "e-Transfer");
  24. $Student[] = new QuaterlyLocals('Gabriel', 'Smith', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12', '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St','IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 4500, "cash");
  25. $Student[] = new MonthlyLocals('John', 'Lucca', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12', '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St','IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 4500, "cash");
  26. $Student[] = new ExtendedPaymentInternacional('Julia', 'Morgan', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12', '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St','IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 4500);
  27. $Student[] = new QuaterlyInternationals('Amanda', 'Bishop', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12', '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St','IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 4500);
  28. $Student[] = new MonthlyInternationals('Jess', 'Bishop', 'annt@gmail.com', '14/07/1991', '1 657 7894559 12', '1 704 7894559', 'Canada, BC, Vancouver, 1236, 7895, Howe St','IELTS', 'Local', 111, 'Web Development','21/01/2017', 1000, 9500);
  29.  
  30. //For each object in the array $Student, grab the student data, store it the var $student, and print it with the payment option and all the object members.
  31. foreach ($Student as $object => $student) {
  32. echo "<span class=text-left>Student: {$object} => </span>";
  33. echo "<pre class=text-left>";
  34. echo "<hr/>";
  35. echo $student->payment();
  36. echo "<hr/>";
  37. print_r($student);
  38. echo "</pre>";
  39. }
  40. }
  41. catch (Exception $exception){
  42. echo "<br/>";
  43. echo '<span style="color:red;">Caught exception: ', $exception->getMessage(), '</span>';
  44. }
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement