Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("class_dates.php");
- require_once("class_address.php");
- require_once("class_phone.php");
- require_once("class_students.php");
- require_once("class_locals.php");
- require_once("class_internationals.php");
- require_once("class_loan.php");
- require_once("class_selffunded.php");
- require_once("class_extendedpayment.php");
- require_once("class_extendedpaymentinternationals.php");
- require_once("class_quaterlylocals.php");
- require_once("class_quaterlyinternationals.php");
- require_once("class_quaterlylocals.php");
- require_once("class_monthlylocals.php");
- require_once("class_monthlyinternationals.php");
- require_once("header.php");
- //Creating all the objects in the same array: $Student[]
- try{
- $Student[] = new Loan('Anne', 'Thompson', '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);
- $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");
- $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");
- $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");
- $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);
- $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);
- $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);
- //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.
- foreach ($Student as $object => $student) {
- echo "<span class=text-left>Student: {$object} => </span>";
- echo "<pre class=text-left>";
- echo "<hr/>";
- echo $student->payment();
- echo "<hr/>";
- print_r($student);
- echo "</pre>";
- }
- }
- catch (Exception $exception){
- echo "<br/>";
- echo '<span style="color:red;">Caught exception: ', $exception->getMessage(), '</span>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement