Java Reference
In-Depth Information
Short Answer (continued)
6 . A ( n ) _______________ i s a p r o g r a m that receives a request for information
from another program over the Web and returns data to the requesting
program.
7. Many programmers refer to the entire Java platform as the JDK, which is an
a c r o n y m f o r _______________.
8 . A ( n ) _______________ i s a p r o g r a m that converts a programmer's code into
machine-readable instructions, whereas a(n) _______________ i s a p r o g r a m
that will execute the bytecode to produce results.
9 . T h e _______________ i s a standard set of interfaces and classes functionally
grouped into packages that are present in any Java implementation.
10. Both _______________ and _______________ assist programmers by color coding
key elements in Java code, as well as inserting line numbers.
11. List the six phases of the program development life cycle in order and briefly
describe the purpose of each.
12. List the essential inputs and outputs for a program that calculates and dis-
plays sales tax based on a user-supplied dollar amount.
13. List three sets of test data for a program that determines the quotient A/B,
where A must be an integer between 21 and 10, and B must be non-zero.
14. Which variable(s) would you test in Figure 1-15 on page 19 to ensure that
the entered ounces are a positive integer? Describe the valid range of the
variables you select.
15. An employee's weekly gross pay is determined by multiplying the hours
worked by the rate of pay. Overtime (hours worked more than 40) is paid
at 1.5 times the hourly rate. Answer the following questions:
a. List the essential inputs and outputs. List sample data that includes
boundary values.
b. Draw a storyboard to label and accept the inputs, and calculate and dis-
play the outputs. Identify and label the input and output text boxes, and
any buttons on the storyboard.
c. Draw a class diagram for the Gross Pay object.
d. Draw a flowchart to calculate the gross pay.
e. Write the pseudocode that corresponds to the flowchart in Step d above.
f. Draw an event diagram for the Gross Pay event.
16. Draw a generalization hierarchy chart for a book object. Include a superclass
and at least two subclasses. Below the chart, list and label attributes, meth-
ods, a trigger, and an instance of a topic.
17. Draw a class diagram for a Print button in an application toolbar.
18. Draw an event diagram for an elevator request. Include the user pushing the
button as a trigger, the light coming on, and the elevator sensing the request.
Follow the event through the elevator arriving at the floor and the doors
opening.
19. Write the pseudocode and then draw a flowchart for a program that accepts
the age of the user and then tests that value to display one of the following
three categories: youth (<18 years), adult (18 to 65 years), or senior (>65
years).
Search WWH ::




Custom Search