Java programming: (1) 22. When is it a good idea to catch an exception? A. every
ID: 3909089 • Letter: J
Question
Java programming:
(1) 22. When is it a good idea to catch an exception? A. every method should catch exceptions if calling a method that throws them, B. every method should at least catch then throw the same exception C. only if it to possible to do something appropriate based on type of exception, D. only the main function should catch exceptions. (1) 23. The following are characteristics of good decomposition: A. high dependency between classes, B. Intermingling controller and UI, C. weak coupling, D. weak cohesion. (1) 24. Command Pattern involves: A. a different class for each command B. the controller containing a different method for each command C. separation of UI from controller, D. keeping a list of commands to execute, E. all of the above. (1) 25. To create a custom window application using Swing, it is best to A. create a listener, B. create a Graphics2D object, C. extend the ActionListener class, D. extend the JFrame class. (1) 26. In a GUI, the controller is largely implemented within: A. listeners B. commands, C. the model, D. through notificationsExplanation / Answer
22. A. every method should catch exceptions if calling a method that throws them.
23. A. high dependency between classes
24. E. all of the above
25. D. extend the JFrame class
26. A. listeners
**Comment for any further queries.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.