Part 1  Create a Course class. The Course class in PHP has the following data fields: - course name (private) - capacity (private) - instructor name (private) - number of courses created (private static) 1) Create getters and setters for all personal data fields 2) Create a getter for the static data field 3) Create a constructor that sets up all the course information and has an instructor named 'Dr. Yulia Kumar' by default. Every time a new course is created the number of courses created is incremented by 1. 4) Create a method printCourseInfo() that will output the course information in the clear and easy readable form. 5) Create two courses of your choice (Biology, Chemistry, etc.), print their information using printCourseInfo(). Display the number of courses created using getter for the static data field.   Part 2  Create an OnlineCourse class - a child of Course. The OnlineCourse has a single personal data field: the total number of points (private). 1) create getters and setters for the data field. 3) create a constructor that sets up all parent and child information at once. 4) Override the method printCourseInfo() so it outputs the OnlineCourse information in the clear and easy readable form 5) Create two Online Courses of your choice in the same file where parent Courses were created. Verify that the total number of created courses is 4

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

QUESTION 4

  1. Part 1  Create a Course class.

    The Course class in PHP has the following data fields:

    - course name (private)

    - capacity (private)

    - instructor name (private)

    - number of courses created (private static)

    1) Create getters and setters for all personal data fields

    2) Create a getter for the static data field

    3) Create a constructor that sets up all the course information and has an instructor named 'Dr. Yulia Kumar' by default. Every time a new course is created the number of courses created is incremented by 1.

    4) Create a method printCourseInfo() that will output the course information in the clear and easy readable form.

    5) Create two courses of your choice (Biology, Chemistry, etc.), print their information using printCourseInfo(). Display the number of courses created using getter for the static data field.

     

    Part 2  Create an OnlineCourse class - a child of Course.

    The OnlineCourse has a single personal data field: the total number of points (private).

    1) create getters and setters for the data field.

    3) create a constructor that sets up all parent and child information at once.

    4) Override the method printCourseInfo() so it outputs the OnlineCourse information in the clear and easy readable form

    5) Create two Online Courses of your choice in the same file where parent Courses were created. Verify that the total number of created courses is 4.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY