Assignment 1
Go back to the Chapter 8 Programming Exercises on the last page of Chapter 8.
Follow the directions to complete all four exercises.
Upload your four .java files here, including your comments to answer any questions asked in the exercises.
class CharAssassination
{
   public static void main ( String[] args )
   {
    char ch = "A";
    System.out.println("A char: " + ch );
    //setting ch to AA returns 'not a statement'
    //setting ch to '' returns 'empty character litereral'
    //setting ch to "A" returns 'required:char'
    //'A' and 'Z' work just fine
   }
}
class DoubleJeopardy
{
   public static void main ( String[] args )
   {
    //script will not compile with a value too large for double
    //such as with the value below
    double value = 32.1234E309; //32 and 32.0 appear the same as 32.0
    System.out.println("A double: " + value);
   }
}
class ExponentialExplosion
{
   public static void main ( String[] args )
   {
    double value = 1000;
    System.out.println("e to the power value: " + Math.exp( value ) );
    //compiles correctly with 32
    //if I keep upping value eventually it outputs
    //"e to the power value: Infinity"
   }
}
class Shortfall
{
   public static void main ( String[] args )
   {
    int value = 35000; //would not compile as type short, too large
    System.out.println("An int: " + value);
   }
}