This is what i got so far:
Main.java
ackage rpg;
public class Main {
public static void main(String args[]){
Operators choice;
choice = new Operators();
Welcome choice2;
choice2 = new Welcome();
choice2.intro();
}
}
I'll not try to program in here, only to include other classes and methods.
Operators.java
package rpg;
public class Operators {
void addition(){
}
void substraction(){
}
void divide(){
}
void multiply(){
}
}
Here will all of the operators be stored.
Welcome.Java
package rpg;
import java.util.Scanner;
public class Welcome {
void intro(){
Scanner input = new Scanner (System.in);
System.out.print("Welcome to Calc 2.0");
System.out.println("This is the main menu");
System.out.println("1. Addition");
System.out.println("2. Substraction");
System.out.println("3. Divide");
System.out.println("4. Multiply");
int input2 = input.nextInt();
}
}
Here you'll get question about how you want to do your math.
I'm still looking for a solution on what i should do now with the input and variables that stores the user input. Anyone got some idea?

New Topic/Question
Reply




MultiQuote





|