⭕ Overview
▶️ Correction at 6:45 - should be "...set the data from 12 to 200". Sorry.
Below are some general characteristics of classes, interfaces, and traits. The lists are incomplete and not detailed but capture some important features to understand them.
🟩 CLASSES
Can:
CAN have a constructor
CAN have zero or more data members and/or methods
CAN be used to instantiate objects
CAN only extend a maximum of one Class (abstract or concrete)
CAN implement many Interfaces
CAN use many Traits
Cannot:
CANNOT have abstract methods
CANNOT have nested Classes
🟩 TRAITS
Can:
CAN have a constructor
CAN have data fields
CAN have methods
CAN use many Traits
Cannot:
CANNOT extend Classes or implement Interfaces
CANNOT have abstract methods
CANNOT be used to instantiate objects
🟩 INTERFACES
Can:
CAN extend many Interfaces
CAN have only function definitions
CAN only be implemented by an abstract or concrete Class
Cannot:
CANNOT have a constructor
CANNOT have data members
CANNOT have abstract methods
CANNOT be used to instantiate objects
CANNOT extend Classes or use Traits
⭕ About me
I am a Web Instructor, and I’ve authored a textbook and some complete sets of video training courses for / learning (formerly Lynda.com) and https://www.packtpub.com.
⭕ Visit my site: https://christianhur.com
⭕ My complete online training courses:
☑️ The DOM in JavaScript, jQuery, AngularJS, and React : / the-dom-in-javascript-jquery-angularjs-and...
☑️ Building JSF Web Applications with Java EE 7: / building-jsf-web-applications-with-java-ee-7
☑️ Troubleshooting Vue.js: https://www.packtpub.com/application-...
☑️ Angular 7 New Features: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Flask: https://www.packtpub.com/web-developm...
☑️ Full-Stack Web Development with Django & Angular 8: https://www.packtpub.com/web-developm...
☑️ Angular 9 New Features: https://www.packtpub.com/web-developm...
⭕ Check out my book:
Developing Business Applications for the Web: With HTML, CSS, JSP, PHP, ASP.NET, and JavaScript is available on Amazon and MC Press.
☑️ Link: https://www.mc-store.com/collections/...
Watch video PHP Classes, Interfaces, and Traits (Ep. 4) online, duration hours minute second in high quality that is uploaded to the channel Christian Hur 15 June 2020. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 338 times and liked it 9 visitors.