Be the first to rate this file! 44 Downloads (last 30 days) File Size: 3.08 KB File ID: #38316
image thumbnail

Object oriented program demo: animated traffic lights on road intersection

by

 

24 Sep 2012 (Updated )

simple classes and superclass are used to arrange flexible object oriented programming environment

| Watch this File

File Information
Description

Only 31 lines of code in start.m is used to control animated traffic lights on road intersection. LampSuperclass and three clases (trafficLamp, tLamps, map) are used in program. Classes define (1) single Red-Yellow-Green traffic lamp, (2) set of four lamps (North, South, East, West direction) and (3) map of street intersection. Menu is used to change the mode of traffic light operation.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Other requirements tested with MATLAB 2014a
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
21 Oct 2012 Bogumila & Zbigniew MROZEK

tags added: superclass, inheritance

Updates
25 Sep 2012

superclass added

22 Aug 2014

general upgrade insluding proprieties and methods in all classes, title

26 Aug 2014

tested with MATLAB 2014a

Contact us