home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-02-20 | 957 b | 37 lines |
-
- package examples;
-
- import simula.*;
- import simula.simset.simulation.*;
-
- public class PrintProcess extends simula.simset.simulation.Process {
-
- String name;
-
-
- public PrintProcess(String name, Simulation _sim){
- super(_sim);
- this.name = name;
- }
- public void run() {
- int flag = 0;
-
- if (flag == 0) {
- Lang.outtext("..4, 3, 2, ignition sequence start, 1, there we go.. :> " + name) ;
- Lang.outtext("First Stage ignited :> " + name) ;
- flag = 1;
- }
- try {
- Lang.outtext("Second Stage ignition scheduled at time : " + (4 + evTime) + " :> "+ name);
- sim.hold(4);
-
- Lang.outtext("Second Stage ignited :> " + name);
- Lang.outtext("Orbit reached, closing rockets valves :> " + name);
- sim.passivate();
-
- } catch(SimulaException e) {
- Lang.outtext("French Guyana space center, we got a problem :> " + e.getMessage());
- }
- }
- public String toString() { return (String) (name + " (" + evTime + ")"); }
- }