Dart: OOPS
A class without constructor We use class keyword to create a class in Dart. Static Variables which live on the class should be marked with static keyword. Instance Variables and Instance Methods live on the object. this keyword inside an instance method points to the object itself, hence we can access a property of the object. A class with a constructor A constructor is an instance method that is invoked when an object is created from the class. This is a good place to initialize instance variables. A constructor function has the same name as the class. Getters and Setters A combination of the getter and the setter methods are used to transform and/or encapsulate instance variables. In Dart, the getter is an instance method specified by get keyword. This method does not take any arguments, hence it does not contain parentheses () . While the setter method is specified by set keyword which receives value to be set as an argument. Inheritance A class has a constructor w...