All Downloads are FREE. Search and download functionalities are using the official Maven repository.

samples.categories.abstract.pec Maven / Gradle / Ivy

There is a newer version: 0.0.74
Show newest version
define Animal as category with attribute name, and methods:

    define speak as abstract method

define Dog as Animal with methods:

    define speak as method doing:
        printLine "I'm a dog, I bark!"

define Cat as Animal with methods:

    define speak as method doing:
        printLine "I'm a cat, I meow!"

define main as method doing:
    animals = [ Cat, Dog ]
    for each animal in animals:
        animal.speak




© 2015 - 2024 Weber Informatics LLC | Privacy Policy