MODEL MASTER
AN OBJECT-ORIENTED SPREADSHEET FRONT-END

Making spreadsheets safer

Contents Previous Next

MM circuit example - the other objects

We go on to describe an inverter, that subtracts its input from 1 at each step.

object amplifier
    attributes
        input : real
        output: real
    where
        output[t] = 5*input[t].

object amplifier_with_feedback is_a amplifier
    where
        input[0] = 1 &
        (t>0) input[t] = output[t-1].

object inverter
    attributes
        input : real
        output: real
    where
        output[t] = input[t]-1.

 


Contents Previous Next

Copyright © 1998 J Ireson-Paine. All rights reserved