list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

Inheriting Distributable from a class

If a class is declared distributable then all children classes of that parent class are also distributable.

Example

/* 
In this example all 3 classes are distributable because Supplier and Vendor both inherent the disributable trait from the Person class. 
*/  
  
namespace example;

class Person {  
    distributable;  
}  
  
class Supplier {  
    String supplierID;
    isA Person;
}  
  
class Vendor {  
    String vendorId;
    isA Person;
} 
      

Load the above code into UmpleOnline