image thumbnail

Object oriented programming examples

version 1.51.0.0 (8.07 KB) by Bogumila & Zbigniew MROZEK
examples from book: MATLAB and Simulink, 3e: User's Guide) by Bogumila and Zbigniew Mrozek

2.5K Downloads

Updated 19 Mar 2017

View License

Examples of classes inheritance, public and private attributes and methods from chapter 5.7 of the new edition of book by Bogumila and Zbigniew Mrozek. Comments are in Polish and English language. Save all files in same folder, then run: See also improved OOP examples of "Object oriented program example: animated traffic lights on road intersection" by Bogumila & Zbigniew MROZEK
(files)
(1) m571 -- how to define class and introduce object ,
(2) m573 -- error, as private attribute is not seen outside its object
(3) m574 -- private attribute is seen, if get function is used
(4) m575 -- testing trasa method, do I have enough fuel?
(5) m590 -- inheritance test

Cite As

Bogumila & Zbigniew MROZEK (2021). Object oriented programming examples (https://www.mathworks.com/matlabcentral/fileexchange/29637-object-oriented-programming-examples), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!