• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 19 pages
Exam (elaborations)

CSE271 Final Exam

Document preview thumbnail
Preview 3 out of 19 pages

Exam of 19 pages for the course CSE271 at CSE271 (CSE271 Final Exam)

Content preview

CSE271 Final Exam


1. Which of the following statements about abstract methods is true?
a.) An abstract method has a name, parameters, and a return type, but no code in the body of the
method.
b.) An abstract method has only a name and a return type, but no parameters or code in its body.
c.) An abstract method has parameters, a return type, and code in its body, but has no defined name.
d.) An abstract method has a name, a return type, and code in its body, but has no parameters.: a.)
An abstract method has a name, parameters, and a return type, but no code in the body of the
method.
2. If a class has an abstract method, which of the following statements is NOT true?
a.) You cannot construct an object from this class.
b.) You can construct an object from this class.
c.) All non-abstract subclasses of this class must implement this method.
d.) You can inherit from this class.: b.) You can construct an object from this class
3. Which of the following statements about classes is NOT true?
a.) You can create an object from a class declared with the keyword final.
b.) You can override methods in a class declared with the keyword final.
c.) You cannot extend a class declared with the keyword final.
d.) You cannot create subclasses from a class declared with the keyword final.: b.) You can
override methods in a class declared with the keyword final.
4. The reserved word in a class definition ensures that subclasses cannot be created from this
class.
a.) final
b.) static
c.) anonymous
d.) abstract: d.) abstract
5. A/an object contains methods that describe the actions to be taken when a user clicks
a user-interface graphical object.
a.) Action Listener
b.) Event source
c.) Action method
d.) Event Listener: d.) Event Listener
6. To respond to a button event, a listener must supply instructions for the
method of ActionListener interface.


, CSE271 Final Exam
a.) actionEvent
b.) eventAction






, CSE271 Final Exam


c.) actionPerformed
d.) eventResponse: d.) actionPerformed
7. Which of the following statements about event listeners is true?
a.) A program must have separate event listener for each type of event to which it wishes to respond
b.) A single event listener can be used to respond to multiple types of events to which the program
wishes to respond.
c.) A program can have only one listener which covers all events
d.) To install a listener, you do not need to know the event source.: b.) A single event listener can
be used to respond to multiple types of events to which the program wishes to respond.
8. An event listener for a button must implement the interface.
a.) ActionPerformed
b.) EventListener
c.) ActionEvent
d.) ActionListener: d.) ActionListener
9. What's the difference between a text field and a text area?
a.) A text field is for a single line of text and a text area is for multiple lines of text.
b.) A text field can be edited by the user, but a text area cannot.
c.) A text area can have scroll bars but a text field cannot.
d.) A text field is used for input only and a text area is used for output only.: a.) A text field is for a
single line of text and a text area is for multiple lines of text.
10.Place drawing instruction inside the method, which is called when- ever the
component needs to be repainted.
a.) paint
b.) draw
c.) paintComponent
d.) drawComponent: c.) paintComponent
11.To build a user interface that contains multiple graphical components, the components .
a.) Must each be added to a separate panel.
b.) Must be added directly to a frame component.
c.) Must be added to a frame that is contained within a panel.
d.) Must be added to a panel that is contained within a frame.: d.) Must be added to a panel that is
contained within a frame.
12.What is the default layout manager of JPanel?

Document information

Uploaded on
December 21, 2024
Number of pages
19
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$9.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
smartchoices
4.8
(9)
Sold
39
Followers
5
Items
4500
Last sold
1 month ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions