What are the 3 scopes that a class property or method can be declare as? What is the difference?
Responses = Private – the property/method can only be used by the class that defined it Protected – the property/method can only be used by the class that defined it and any sub-classes Public – the property/method can be called by any class …
What is class abstraction?
Good response = An abstract class is a class that cannot be instantiated and contains abstract methods that are used to define method signature rather than the implementation of the method. Any inheritance of the abstract class must implement any defined abstract methods, and cannot change the original signature. It is generally used to allow for similar usage across different implementation of code. …
Explain what what is a Trait?
Good response = A Trait is a reusable class that can provide fine-grained (small) sections functionality …