Java Reference
In-Depth Information
41. 11 18 25
43. -1 0 3 8 15 24
45. 12 11 9 7 6 4 2 1
Chapter 6
1. a. True; b. True; c. True; d. True; e. False; f. False; g. True; h. True; i. True;
j. False; k. False; l. False
3. JTextField
5. To identify other GUI components such as a JTextField .
7. Through the process outlined, you have a methodology that will allow you to
critically think and plan your problem-solving approach. You may be able to identify
the flaws involved in your thinking before you implement it. A well-analyzed problem
leads to a well-designed algorithm. Also, a program that is well-analyzed is easier to
modify and spot and fix errors. No one would build a house without a blueprint.
9. The answer to this question is available with the Additional Student Files at
www.cengagebrain.com .
11. a. JLabel numOfCourses;
numOfCourses = new JLabel("Enter the number of courses");
b. JButton run;
run = new JButton("Run");
c. JTextField oneTextField ;
oneTextField = new JTextField(15);
d. setTitle("Welcome Home!");
e. setSize(200, 400);
f. JTextField oneTextField;
oneTextField = new JTextField(15);
oneTextField.setText("Apple tree");
13. The answer to this question is available with the Additional Student Files at
www.cengagebrain.com .
15. displayWelcome, getAcctNo, getPin, verifyAcct, deposit, withdraw,
transfer, tenderCash, checkAcct , and so on.
17. Customer : data members include firstName , lastName , phone , email ,
address ; methods include set and get methods for data members.
Account : accountNumber , type , currentRate ; methods include set and get
methods for data members.
Loan : loanNumber , type , currentRate ; methods include set and get methods
for data member.
Manager : data members
include firstName , lastName , phone , email ,
address ; methods
include set and get methods
for data members,
createAccount , approveLoan , and so on.
 
 
Search WWH ::




Custom Search