Programming and Problem Solving with Java

(やまだぃちぅ) #1
737

Chapter 12 Exam Preparation Exercises



  1. a.col 0 1 2
    row
    0000
    1012
    2024
    3036
    b.col 0 1 2
    row
    0012
    1120
    2201
    3UUU
    c. col 0 1
    row
    023
    123
    223
    323
    423
    523
    623
    745

  2. a.boolean[][] myArray = new boolean[ 5 ][ 6 ];
    b.double[][] MyArray = new double[ 40 ][ 200 ];
    c. char[][] myArray = new char[ 4 ][ 3 ];

  3. a.1.4E+12
    b.100.0
    c. 3.2E+5

  4. a.The mantissais the part of the floating-point number that contains the
    representable significant digits.
    b. The exponentis the part of the floating-point number that determines where
    the decimal point is placed relative to the mantissa.
    c. Representational erroris an arithmetic error that occurs when the precision of
    the true result of an arithmetic operation is greater than the precision of the
    machine.
    d.Significant digitsare those digits from the first nonzero digit on the left to the
    last nonzero digit on the right (plus any zero digits that are exact).

Free download pdf