Question: 1. Write a set of PHP classes to model a small school. The entities to be modeled are: Student: First and Last Name, Phone, GPA,
1. Write a set of PHP classes to model a small school. The entities to be modeled are:
Student: First and Last Name, Phone, GPA, Courses
Instructor: First and Last Name, Phone, Email, Courses
Course: Course name, Textbook, Timeslot (A valid weekday: Monday Friday), Instructor, Students
Textbook: Title, Author, ISBN, Price
2. Create a isQualified(boolean) method in Instructor class. Enforce that all Student classes implement the hasTuition(boolean) method.
3. Write a PHP script to exercise the above classes. Name your script school.php. school.php should:
Instantiate at least 4 courses, 2 instructors, and 5 students
Set students as teachable
Set instructors as qualified
Enroll students in courses
Assign instructors to courses
Print out the four courses, which should show the course name, textbook, teacher, and students, etc, in that course. Hint: Implement __toString() in your various objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
