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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!