Very confused on how to do this assignment. My program is to create a currency exchange (pesos to dollars) using a class. I need to display out the the currency started with, the amount to be exchange, and the amount in dollars after exchanged.
From what I am understanding from the assignment, the showSelection function shows the user the options and then calls displayExchange to display results, The displayExchange function calls on outputType to get the type of money being exchanged. The outputType calls function convert to convert the currency into U.S. dollars.
I know my functions are the reason why the program is not working, probably a few other reasons to. But I don't know how to make it work. Any suggestions or examples will be appreciated. Thanks. Below is my code. I noted in bold comments what the compiler errors to all the time.
The first statement in main is not correct. Before using anything in your class, you should make an instance of that class. exchange MyExchange;
Only then are you able to use the functions of the class instance MyExchange. You can do this by calling the function using the instance's name followed by a period. MyExchange.showSelection();
I'd advice you to read more on classes and how to make them work. Good luck!