Programming and Problem Solving with Java

(やまだぃちぅ) #1

626


{

high = logsCut[logger][month];
bestLogger = logger;
bestMonth = month;
}
7.Declare and instantiate the doublearrays described below.
a.A three-dimensional array in which the first dimension is indexed from 0
through 9, the second dimension is indexed from 0 through 6 representing
the days of the week, and the third dimension is indexed from 0 through 20
b.A four-dimensional array in which the first two dimensions are indexed
from 0 through 49, and the third and fourth have 20 and 30 slots,
respectively
8.If a system supports 10 digits of precision for floating-point numbers, what are
the results of the following computations?
a.1.4E+12 + 100.0
b.4.2E–8 + 100.0
c. 3.2E–5 + 3.2E+5
9.Define the following terms:
a.mantissa
b.exponent
c. representational error
d.significant digits
e.overflow
10.Show precisely the output of the following Java application. Use a to indicate
each blank.
importjava.awt.*;
importjava.text.*;
importjavax.swing.*;

public classExamPrep
{
public static voidmain(String args[])
{
DecimalFormat decimal;
DecimalFormat integral;
JFrame dataFrame; // User interface frame
Free download pdf