Create three classes the Calculation class, Conversion class and Menu Class.
The Conversion class should have the following methods.
double KMToMiles(double distance)
double MilesToKM(double distance)
double FeetToMetres(double distance)
double MetresToFeet(double distance)
double KgToPounds(double weight)
double PoundsToKg(double weight)
double CelciusToFahrenheit(double temperature)
double FahrenheightToCelcius(double temperature)
The Calculation class should have the following methods
int SumOfSeries(int start, int end, int incr)
int SumOfArray(int data[], int size)
int ProductOfSeries(int start, int end, int incr)
int ProductOfArray(int data[], int size)
e.g. SumOfSeries(10,20,2) should produce the answer 90
Hint : 10+12+14+16+18+20
Similary ProductOfSeries(100,200,50) should produce 3,000,000
Hint : 100x150x200 = 3,000,000
The Menu class should have the following methods
void displayMainMenu()
void displayConversionSubMenu()
void displayCalculationSubMenu()
void displayConversionLengthSubmenu()
void displayConversionWeightSubmenu()
void displayConversionTemperatureSubmenu()
The menu class methods should display the options available under each selected menu. e.g. The
displayCalculationSubMenu() method should display the following.
Calculation Sub Menu
- Sum of Series
- Sum of Array
- Product of Series
- Product of Array
- Exit
If the user selects the sum of array option (option 2), your program should input the size of the array,
get values to the array from the keyboard, create a Calculation type object and invoke the SumOfArray()
method to calculate the sum of the Array element and to display it. After displaying the answer the
same sub menu should be displayed. When the user selects Exit (option 0), you should exit from that
sub menu.