Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to do Matlab Object Orientated Programming for catenated Objects

1 回表示 (過去 30 日間)
J. Hu
J. Hu 2013 年 9 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I am a beginner for OOP. I tried some simple examples and found out it is really good. So I wanted to apply to a more complicate project I am working on.
In the project, there are objects in different layers. Main object has several layer1 objects. Layer1 objects have several layer2 objects, and so on for four/five layers. For each object at a layer, it has properties/attributes and associated methods, etc.
The reason to organize the objects in layers is that some attributes for some objects need to be passed from one to another. Just like passing variables from a function to its parent/brother/kid function or reverse.
How can this be done? Is there any example? Thanks...
  2 件のコメント
Daniel Shub
Daniel Shub 2013 年 9 月 27 日
Are you talking about sub classing or do you mean that a layer 1 object has a property that is a layer 2 object?
J. Hu
J. Hu 2013 年 9 月 27 日
編集済み: J. Hu 2013 年 9 月 27 日
Not quite sure, but I think I wanted to know both - sub classing & layer 2 (kid) has property inherited from layer 1(parent) object, something like that. Thanks...

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by