/** This program is intended to be used with the book "Java 6 -- What Do You Want To Do?"
 * by Steven P. Warr and is distributed free of charge and without and expectations of remuneration.
 * Chapter BAS   NOTE all programs begin with the title of the chapter in which
 * they are intended to be used.   Copyright 2008 Steven P. Warr All rights reserved
 */

import java.util.*; 
public class Bas05 
{
    public static void main(String[ ] args) 
    {
       //variable definition statements.
              String name = "";    //empty String ; 
	       int firstNum = 0, secondNum = 0;   		//initialize to 0
              int sum = 0, difference = 0, product = 0; 
              double quotient = 0;  			// The quotient will need decimals.
      		
       //input statements
              Scanner input = new Scanner(System.in);  //input is an object  of the Scanner class
						//Do not worry about what an object (chapter OOP) is.
						//At this point you can treat it like a variable.	
              System.out.println ("What is your name?"); //prompt – Tells the user what to do.
              name = input.next( );                                     //inputs a String into name.
              System.out.println ("Enter the first number"); //prompt – Tells the user what to do.
              firstNum = input.nextInt( );      //inputs an integer into firstNum.   NOTE nextInt( )
              System.out.println ("Enter the another number"); //prompt – Tells the user what to do.
              secondNum = input.nextInt( );      //inputs an integer into secondNum.   NOTE nextInt( )
	
	//calculation statements
  	          sum = firstNum + secondNum;            
	          difference = firstNum - secondNum;   
	          product = firstNum * secondNum;
	          quotient = (double)firstNum / secondNum;   
	
//output statements.  
			  System.out.println("Hello " + name + " the sum of  " + firstNum + " and " +
			                    	secondNum + " is  " + sum);    		//variables are not in " pairs
			  System.out.println("Hello " + name + " the difference of  " + firstNum + " and " +
			                    	secondNum + " is  " + difference);    	//even number of "
			  System.out.println("Hello " + name + " the product of  " + firstNum + " and " +
			                    	secondNum + " is  " + product);      
			  System.out.println("Hello " + name + " the quotient of  " + firstNum + " and " +
			                    	secondNum + " is  " + quotient);  
      	// I didn’t use JoptionPane here because I want a list.
    }
}
