hehe, the million bucks question! You need to start getting away from the keyboard and design. If you rush into code you will not hit the mark. For example: How will you be treating the different units? Enumerations? Classes? If classes, will you use a base Unit class for all classes for all dimensions? Are you going to tackle compound dimensions like area, speed, acceleration? If yes, how will you make those work so that a programmer can do:
1 2 3 4 5 6 7 8 9 10
|
Distance = testedDistance;
cout << "Enter the distance traveled by the test vehicle: ":
cin >> testedDistance;
Time runningTime;
cout << "Enter the time the vehicle took to travel the distance: ";
cin >> runningTime;
Speed measuredSpeed = testedDistance / runningTime;
//Or using a constructor so I can decide the speed units, like kilometers per hour:
Speed measuredSpeed(testedDistance, runningTime, Kilometer, Hour);
cout << "The measured speed was " << measuredSpeed << "." << endl;
|
And that raises another question: Is Kilometer any different from meter? Or should the Kilo part be translated as it is, a multiplier of 1000? What about all other prefixes like Deca, Hecto, Mega, Giga, Tera? What about the small ones (deci, centi, milli, micro, etc.)?
This is no small project, I tell ya!