07-23-2013 06:56 PM
Hi:
I have a Battery Simulator class, that has class information (ctl) about a Battery Module (Module Voltage, Current, SOC, Temp, number of Cells etc); What is the best way to create(to simulate) 2 or more Battery Modules; They both contain different data... I need perform Compare operations between them...
Regards,
Leela.
07-23-2013 07:53 PM
Why not have 2 class objects of the Battery type..? They won't overwrite each other's data.
07-24-2013 10:57 AM
There's a major distintion in OOP that you are missing here. A class is nothing but a blueprint for an object. It contains no data. An object is what contains the data. You can have as many objects of a class as necessary. And since it is the object that holds the data, you will have no issues with overwritting your data.