QUESTION 1 Which of these is not included in a class diagram of an object class?
ID: 3692970 • Letter: Q
Question
QUESTION 1 Which of these is not included in a class diagram of an object class? the parent class the class name the methods the attributes
QUESTION 2 To create a subclass which Java keyword do you use? EXTENDS
QUESTION 3 If our subclass constructor signature contains the same name for a method as the parent class, but a different argument list, this is called "overriding". True False
QUESTION 4 The super statement, to call a superclass constructor, can be placed anywhere within a subclass constructor. True False
QUESTION 5 Information hiding is achieved with Java classes through: private instance variables public accessor and mutator methods both of these private instance variables and private methods
QUESTION 6 To have an instance variable or method be available only within its own class or in any subclass of the class you would use the keyword:
QUESTION 7 A subclass cannot override final methods of a parent class. True False 0.5 points
QUESTION 8 If any method of a class is abstract the class must be declared abstract. True False 0.5 points
QUESTION 9 If you want to use a toString() method then you must always add this to your class. True False
QUESTION 10 Two objects are considered equal via the default equals() method only if they have the same address, not just because they have the same contents. True False 0.5 points
QUESTION 11 Java supports multiple inheritance, it's just not the best approach according to most programmers. True False
QUESTION 12 Which Java keyword means that you want to use an interface in your class? implements import include none of these
QUESTION 13 The use of Java packages encourages software reuse. True False 0.5 points
QUESTION 14 As a programmer you should try to handle conditions that result from: serious errors from the Errors class less serious errors from the Exceptions class both of these neither of these
QUESTION 15 A finally block, like a catch block, is only executed when an exception occurs. True False
QUESTION 16 A JFrame is a Swing component that you create to hold other Java GUI components that you want to be displayed. True False
QUESTION 17 Which Java GUI component is used to hold text that you might want to display to a user? JButton JCheckBox JButtonGroup JLabel 0.5 points
QUESTION 18 To have your Java GUI components placed in a row that automatically wraps around to the next row when filled, you'd use the BorderLayout class. True False
QUESTION 19 An event listener is Java code that you set up to execute as an event handler when a user event occurs for a GUI application. True False
QUESTION 20 The ___________ class combines the the features showing an option for selection and a drop down list box of other choices. JDropDownChoices JComboBox JPanel JMultiChoices
Explanation / Answer
Q-1: the parent class
Q-2: Extends
Q-3: False
Q-4:True
Q-5:private instance variables
Q-6: protected
Q-7:True
Q-8:True
Q-9: False as all calss extends Object class as it is superclass for all and it provides ToString method. so no need to implement always!
Q-10: False
Q-11: False Java does not support multiple inheritance but supports multi level inheritance.
Q-12: implements
Q-13: False
Q-14:less serious errors from the Exceptions
Q:15 False. Finally block gets executed no matter if exception is caught or not.
Q-16: True
Q-17:JLabel
Q-18: False . The FlowLayout class puts components in a row .
Q-19: True
Q:20 JComboBox --> as there are no others such classes available like JDropDownChoices and JMultiChoices.
JPanel is used for diff purpose.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.