class Vehicle
{
// Now, lets say I want to have engine info
Engine Engine;
// Lets also say that I want to know the make/model
MakeModel MakeModel;
void SomeFunc()
{
// Suppose I knew what type of engine it was
Engine = Engine.vtec3;
// Now, by setting the engine to that type, I should
// be able to have info like:
MessageBox.Show(Engine.NumberOfCylinders);
// How would you design an engine class so that it
// populates all needed data when set? Imagine there
// are 20 or so various parameters for each engine type.
// My second question regards the make/model.
// I should be able to do either of the following:
MakeModel = Honda;
// OR
MakeModel = Honda.Civic;
// I'm not sure how to design this pattern in. :(/>
}
}
class Engine
{
}
class MakeModel
{
}
Can anyone please help point me in the right direction? Thanks!

New Topic/Question
Reply




MultiQuote







|