preview

electronic lab seg2505

Better Essays
Open Document

Rapport de Laboratoire Lab # 2 Cours SEG2506 Remis le 5 Février 2014 dans le cadre du cours de SEG2506 Université d’Ottawa Objectif: L’objectif du laboratoire 2 est de développer une machine d’état UML pour les différents modèles de feu de circulation (léger, modéré et élevé) mais aussi de générer le code java en utilisant UMPLE et l’intégrer dans un programme existant. Introduction : // A FAIRE Conception 1. Modèle de circulation léger ou LowTrafficLight • Machine d’état • Code Umple class LowTrafficLight { status { northAndSouthArrow { entry / { trafficLightManager.northArrow(); } entry / { trafficLightManager.southArrow(); } entry / { trafficLightManager.westRed(); } entry / { …show more content…

outhArrow); wasEventProcessed = true; break; default: // Other states do respond to this event } return wasEventProcessed; } private void setStatus(Status aStatus) { status = aStatus; // entry actions and do activities switch(status) { case northAndSouthArrow: // line 3 "model.ump" trafficLightManager.northArrow(); // line 4 "model.ump" trafficLightManager.southArrow(); // line 4 "model.ump" trafficLightManager.westRed(); // line 5 "model.ump" trafficLightManager.eastRed(); break; case northAndSouthGreen: // line 8 "model.ump" trafficLightManager.northGreen(); // line 9 "model.ump" trafficLightManager.southGreen(); // line 9 "model.ump" trafficLightManager.westRed(); // line 10 "model.ump" trafficLightManager.eastRed(); break; case northAndSouthYellow: // line 13 "model.ump" trafficLightManager.northYellow(); // line 14 "model.ump" trafficLightManager.southYellow(); // line 14 "model.ump" trafficLightManager.westRed(); // line 15 "model.ump" trafficLightManager.eastRed(); break; case northAndSouthRed: // line 19 "model.ump" trafficLightManager.northRed(); // line 20 "model.ump"

Get Access