-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathIOConsole.java
More file actions
43 lines (36 loc) · 985 Bytes
/
IOConsole.java
File metadata and controls
43 lines (36 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import java.util.Scanner;
/**
* Write a description of class IOConsole here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class IOConsole
{
// instance variables - replace the example below with your own
//private int x;
/**
* Constructor for objects of class IOConsole
*/
public IOConsole()
{
// initialise instance variables
//x = 0;
}
/**
* An example of a method - replace this comment with your own
*
* @param y a sample parameter for a method
* @return the sum of x and y
*/
public void display()
{
// put your code here
Calculator c= new Calculator();
Scanner scanner =new Scanner(System.in);
System.out.println("Enter your numbers and operators to calculate");
String s = scanner.next();
System.out.print(c.calc (s));
//System.out.print('\u000C');
}
}