Class Design Within VB.Net -
-edit- finance api designing. in process of creating empty classes, getting sense general structure. primary concern designing pleasant user experience without requiring manual explain how utilize it. -end edit-
i have been scratching head trying think of best way go designing specific class. create general example illustrate.
namespace somenamespace public class results public a1 integer public a2 integer ... public b1 integer ... public z1 integer end class end namespace
the illustration above generic, point there many values within class. letter in variable name represents similar grouping of results. "a" results similar, "b" similar, etc. had thought create class each type of result value (since type of result, separate concepts each other) within results class such as...
public class results class public a1 integer end class class b ... end class end class
the problem is not explicit when person uses class
dim resultobject new somenamespace.results.a()
the results object have instantiated first, because of sub-classes a,b, etc rely on results object. user see objects a,b, etc , perhaps not know must create parent object first.
i thought making classes separate , each constructor create result object, seems backwards logically. advice? sorry if confusing.
why not create abstract class result , create inheritance construction resulttypea, resulttypeb etc.? no details on problem hard give meaningfull answer.
vb.net
No comments:
Post a Comment