Tech Off Post

Single Post Permalink

View Thread: Class Design
  • User profile image

    VBJB wrote:
    This is where I started, but after looking at it I thought I could group things better. Working with the many properties of my Class FMA3, groups of similar properties started forming. I thought I could organize things better, putting similar properties together. So I started experimenting with nested classes and it worked. I could call FMA3.Alarm.Msg or FMA3.Alarm.Number, but I noticed another things it was hard to manage everything in one file. So I started breaking them out in separate files and that is where I ran into trouble.

    Ah, I see (Ohhh big machine that goes ping)

    So what you'd really like is something like


    Yes, you can do it, have a machine class, and a class per feature. Expose the properties in the feature class, and make the feature object public in the machine class.

    As an exercise for the reader is this, or is this not, a good idea from an OO viewpoint?