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

Animated traffic lights on road intersection -- OOP (object oriented programming) demo



24 Sep 2012 (Updated )

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

| Watch this File

File Information

Only 30 lines of code in start.m is used to control animated traffic lights on road intersection. Superclass and three clases used in program (trafficLamp, tLamps, map) are used to define (1) single Red-Yellow-Green 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)
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

25 Sep 2012

superclass added

Contact us