Object oriented program example: animated traffic lights on road intersection
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.
Cite As
Bogumila & Zbigniew MROZEK (2022).Object oriented program example: animated traffic lights on road intersection(//www.tatmou.com/matlabcentral/fileexchange/38316-object-oriented-program-example-animated-traffic-lights-on-road-intersection), MATLAB Central File Exchange. Retrieved.
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.