/** This program is intended to be used with the book "Java 6 -- 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 program names begin with the title of the chapter in which
 * they are intended to be used.   Copyright 2008 Steven P. Warr All rights reserved
 */


import javax.swing.JOptionPane;
public class Bas02 
{
        
    public static void main(String[ ] args) 
    {
        System.out.println("This prints the solution for 10 + 5 * 3 - 2 " + 
        	                  (10 + 5 * 3 - 2));// the parentheses are necessary or the compiler
                                                //  will try to concatenate the numbers. Try it 
                                                //  with 10 + 5 + 3 + 2.
        JOptionPane.showMessageDialog(null,"This will do the same  " + 
                                       (10 + 5 * 3 - 2));  
        JOptionPane.showMessageDialog(null, "This answer should be  10.5  but  " + 
                                                   		((7 * 3) /  2 ));  
        JOptionPane.showMessageDialog(null, "This answer is  10.5  " + 
                                                   		((7 * 3) /  (double)2 ));  
   }
}
