Question: Create a class named Car with name and year as its properties. Create the class functions set _ name ( ) , get _ name
Create a class named Car with name and year as its properties. Create the class functions
setname getname setyear and getyear These functions should be self
explanatory eg getname gets the name and setname sets the name of the car Create
an instance of your class with the object name, $ford. Set its name as Ford and the year as
Print the name and year by accessing the object's properties. Print using the format:
Name Year.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
