Skip to main content

Posts

Showing posts with the label tostring

Inheritance in MSD axapta

Inheritance in axapta One of the central concepts of object-oriented programming is the possibility to inherit functionality defined at a higher level in the system. This can be done by having a class hierarchy where a method in a subclass overrides a method in the super class (higher level). The method in the subclass can still use the functionality in the same method in the super class by using the super function as in this example: public void sellCar() { ; super(); } This method implies that the class that the method belongs to, extends another class where the functionality in the method sellCar is already written or that the sellCar method is defined at a higher level in the class hierarchy in which this class belong. In our example, we have a super class called Car that extends Object, and then we have we have Car_Economy, Car_Compact, Car_MidSize and Car_Luxury who all extend the class Car. Also, they override the toString method fo...