Link to home
Start Free TrialLog in
Avatar of Member_2_8186723
Member_2_8186723

asked on

PHP Classes

Hi, Please help me to approach this project in the best way possible and can be done in the shortest time.


Create      PHP      classes      for      Student,      Program      and      Course      (plus      child      classes      as      described below).      All      of      these      classes      should      have:

(1)      Appropriate      overall      class      structure;      use      comments      to      identify      sections      and       elements      of      each      class.

(2)      Constructors      that      populate      object      properties,      either      directly      within      the      constructor      AND/OR      passed      to      the      method      when      an      object      is      created.

(3)      For      all      classes,      demonstrate      proper      encapsulation,      with      properties      and      methods made      public      ONLY      if      other      coders      need      direct      access      to      that      element,      and      only      if      the      element      can't      potentially      break      if      it      is      accessed      directly!

(4)      Student      class      should      have      a      property      of      'paid',      which      is      true      or      false;      student      objects      should      also      have      an      'enrolled'      (true/false)      property      and      an      enrol()      method;      the      method      first      checks      to      see      if      the      student      in      question has      paid,      then      only      enrols      him/her      in      a      program if      so.

(5)      Student      should      also      be      the      parent      of      GradStudent      and      Undergraduate      classes;      these      child      classes      should      differ      in      at      least      1-2      significant      ways      (e.g.,      GradStudent      has      an      advisor      property,      as      well      as      other      properties      and      methods,      that       Undergraduate      does      not      need).

(6)      Program      should      have      title      and      info      properties,      minimally;      neither      of      these      properties      should      be      editable,      only      returned      for      echoing      out.

(7)      Course      should      have      basic      description      information      as      appropriate.

Create      a      'test.php'      page      that      creates      objects      and      echoes      out      values      as      needed.      On      this       page,      create      instance      objects      from      all      of      your      classes,      echo      out      descriptive information,      as      we      have      done      in      class,      no      need      to      style      output      beyond      basic      HTML      formatting      (line      breaks,      paragraphs,      headers).      Set      one      student      object      to      enrolled      using      your      class      methods      and      properties      (but      only      if      they      have      paid!)
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
EXPERT CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@asker

I am interested to know why you selected steve's comment as the answer. Steve was asking you questions about your project - it is not an answer.