Subject: PHP

Create a Class and Object

  • Create a class named Car with properties: make, model, and year.
  • Add a method displayDetails() to display the car's details.
  • Create an object of the Car class and call the displayDetails() method.

Select file or drag and drop

PNG, JPG, SVG

Preview