Hello Everyone, I'm having a bit of trouble seperating my user interface code in a main class from my logic code in another class.
Basically i've put a while statement and some if statements in order to take input of a number from the user and decide which of two statements to call.
while ((result < 1) || (result > 2)) {
System.out.println("Enter 1 to convert from Pounds to Euros and 2 to convert from Euros to Pounds");
result = scan.nextInt();
}
if (result == 1) {
output123 = converter.PoundEuro(input, exchange);
System.out.println(output123);
} else if (result == 2) {
output123 = converter.EuroPound(input, exchange);
System.out.println(output123);
}
If i'm correct ideally parts of this should be in my other class and then it should be called. I'm a total Java novice so can't say for sure. But if i'm right does anyone have any suggestions on how to do this?
Thanks for any advice.
Ranek