JavaSol/ArithmethicOperations.java
JavaSol/ArithmethicOperations.java
/**
* Arithmetic Operations
*
* This program implements an application to
* calculate and print the result of an arithmetic operation with numbers
* entered by user.
*
*
* @author your name
* @since 2021-01-30
*
*/
import java.util.Scanner;
import java.io.*;
public class ArithmethicOperations{
/**
* This is the main method which is going to take inputs
* and call Calculation method with given inputs as arguments.
* @param args Unused.
* @return Nothing.
* @exception IOException On input error.
* @see IOException
*/
public static void main(String[] args){
Scanner input = new Scanner(System.in);
/**
* Declared three variables
* first String type, to store numbers more than one digits
* Second String type, to store numbers more than one digits
* Third Character type, operation will be a character only
* And taking input from the user
* by using Scanner class.
*/
System.out.print("Enter two integer numbers separated by space: ");
String first = input.next();
String second = input.next();
System.out.print("Enter operation symbol (+, -, *, or /): ");
char symbol = input.next().charAt(0);
/**
* call Calculate Method with inputs as arguments
*/
Calculation(first, second, symbol);
}
static void Calculation(String first, String second, char symbol){
/**
* This met...