educational course/tutorialoutlet.com educational course/tutorialoutlet.com | Page 28

D. None of the above, you would add the code to a method of a class that extends JButton. 4.( 0.5 pts) True or False?( circle one) A listener object can be ― listening ‖ to multiple components and do different things depending upon which component generates an event.( 0.5 pts) True or False?( circle one) A listener object can be ― listening ‖ for one and only one type of event( e. g. ActionEvents for clicks on buttons or MouseEvents to respond to mouse motion like drawing but not both).( 0.5 pts) True or False?( circle one) Multiple listener objects can be listening and execute code for a single event on one component. For example, two different listeners could respond, each in their own way, to a single button click.( 1 point) Write a complete program that prints the first 50 multiples of 3( i. e. 3, 6, 9, … 150). 5. 6. 7. THERE ARE MORE QUESTIONS ON THE BACK 8.( 1 point) Write the method needed by this program. It prints true if the 3 numbers read from the console are in increasing order, and false otherwise. That is, each number must be strictly larger than the previous. Entering 3 4 5 would result in true, but entering 3 3 5 would result in false as would 3 5 4. import java. util.*; class Ordered { static final Scanner in = new Scanner( System. in); public static void main( String args) { boolean x = increasing( in. nextInt(), in. nextInt(), in. nextInt()); System. out. println( x); } } 9.( 2 points) Write a method findLargest that takes a reference to an IntListElement, list, and returns the value of the largest integer stored in the list. E. g. If the list myList contained 3, 4, 5, 1 then x = findLargest( myList) would assign x to be 5. You should assume that the list is not empty.( BONUS up to 3 points for overall quiz total for the quarter) Write a method get(), to be