Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  Graphics.java

  Sprache: JAVA
 

package gui;

import java.io.Serializable;

import org.overture.interpreter.runtime.ValueException;
import org.overture.interpreter.values.Value;
import org.overture.interpreter.values.VoidValue;


public class Graphics implements Serializable  {

 private static final long serialVersionUID = 1L;
 transient Controller ctrl;
    Model model;
   
    public Value init() {
     ctrl = new Controller();
     model = ctrl.getModel();
        return new VoidValue();
    }

    public Value sleep(){
        try {
   Thread.sleep(500);
  } catch (InterruptedException e) {
   e.printStackTrace();
  }
     
        return new VoidValue();
    }
    
    public Value move(){
     model.move();
     
     return new VoidValue();
    }
    
    public Value busInRouteTo(Value busline, Value roadid, Value waypoint, Value time) {
     
     try {
      String road = roadid.stringValue(null);
      
      if(road.startsWith("<"))
      {
       road = road.substring(1, road.length()-1);
      }
      
      String wp = waypoint.stringValue(null);
      if(wp.startsWith("<"))
      {
          wp =  wp.substring(1, wp.length()-1);
      }

   model.busInRouteTo((int) busline.intValue(null), road , wp, (int)time.intValue(null));
  } catch (ValueException e) {
   e.printStackTrace();
  }
  
  return new VoidValue();
    }

    public Value passengerAtCentral(Value id, Value goal) throws ValueException{

     final Value temp = id;
     String wp = goal.stringValue(null);
  if(wp.startsWith("<"))
  {
      wp =  wp.substring(1, wp.length()-1);
  }
     
     model.passengerAtCentral((int) temp.intValue(null), wp);
     
      return new VoidValue();
    }
    
    public Value passengerAnnoyed(Value id) throws ValueException{

     final Value temp = id;
     model.passengerAnnoyed((int) temp.intValue(null));
     
      return new VoidValue();
    }
    
    public Value passengerGotOnBus(Value id) throws ValueException{
 
  final Value temp = id;
     model.passengerGotOnBus((int) temp.intValue(null));
     
      return new VoidValue();
    }
    
    public Value inflowChanged(Value val) throws ValueException{
     
  final Value temp = val;
     model.inflowChanged((int) temp.intValue(null));
     
     return new VoidValue();
    }

 public Value busStopping(Value busline) throws ValueException {
  
  model.busArrived((int)busline.intValue(null));
  
  return new VoidValue();
 }
 
 public Value busAdded(Value busline) throws ValueException {
  
  model.busAdded((int)busline.intValue(null));
  
  return new VoidValue();
 }
 
 public Value busPassengerCountChanged(Value busline, Value count) throws ValueException {
  
  model.busPassengerCountChanged((int)busline.intValue(null), (int)count.intValue(null));
  
  return new VoidValue();
 }
}

Messung V0.5 in Prozent
C=90 H=93 G=91

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik