Need to create a default constructor that generates a random question, addition or subtraction. And when adding the numbers must be random from 0-12 and when subtracting the first number must be from 6-12, while the second is less than the first number. Here's my progress as of now:
Also, when called via the toString method I get: 6-0. Every time I run it.package project4; public class Question { private int num1; private int num2; private char operand; public Question() { operand = '+'; num1 = (int)(Math.random())*12; num2 = (int)(Math.random())*12; operand = '-'; num1 = ((int)(Math.random())*12+6); num2 = (int)(Math.random()) << num1; } public String toString() { String str = new String(num1 + " " + operand + " " + num2); return str; } }