Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

OOP Test 1 UPDATED ACTUAL Exam Questions and CORRECT Answers

Document preview thumbnail
Preview 2 out of 7 pages

OOP Test 1 UPDATED ACTUAL Exam Questions and CORRECT Answers Software objects share two characteristics of __________ and __________. - CORRECT ANSWER - State, behavior Benefits of modeling using objects in software include - CORRECT ANSWER use Information-hiding Modularity Pluggability and debugging ease - Code re The purpose of a class in object-oriented programming environment is to model the state and behavior of a real-world object. - CORRECT ANSWER - True

Content preview

OOP Test 1 UPDATED ACTUAL Exam
Questions and CORRECT Answers
Software objects share two characteristics of __________ and __________. - CORRECT
ANSWER - State, behavior



Benefits of modeling using objects in software include - CORRECT ANSWER - Code re-
use
Information-hiding
Modularity Pluggability and debugging ease


The purpose of a class in object-oriented programming environment is to model the state and
behavior of a real-world object. - CORRECT ANSWER - True


In object-oriented terms what is used as a blueprint to model a real-world object? - CORRECT
ANSWER - Class


Object-oriented programming allows for inheritance so commonly used state and behavior can
be reused. The class that is inherited from is the __________ and the new class is the
__________. - CORRECT ANSWER - Superclass, subclass


A declaration statement declares a variable. The following code is a correct example of a
declaration statement: double value = 100; - CORRECT ANSWER - True


How many superclasses can a subclass extend when using inheritance in object-oriented
programming using the Java programming language? - CORRECT ANSWER - One


When using inheritance what does the new class inherit when it is derived from another class? -
CORRECT ANSWER - State, behavior

, When implementing an interface in object-oriented programming all __________ must be
included in the source code for the class to compile. - CORRECT ANSWER - Methods


What programming best practice should be used when identifying state and behaviors that are
derived from another class or defined locally in the new class? - CORRECT ANSWER -
Comment the code


Local variables are commonly used in methods to store a temporary state. Local variables are
visible __________. - CORRECT ANSWER - Between the opening and closing braces of
the method where they are declared


Given the signature for the required main method in the Java programming language, public
static void main (String[] args), what is args called from a variable perspective? - CORRECT
ANSWER - Parameter


Compound assignment operators combine an arithmetic operator with the __________ operator.
- CORRECT ANSWER -=



An expression can comprise - CORRECT ANSWER - Variables
Operators
Method invocations


An expression statement forms a complete unit of execution with a terminating semicolon. The
following code is a correct example of an expression statement: Bicycle myBike = new Bicycle()
- CORRECT ANSWER - False


Regarding source code, a block is a group of 0...n statements balanced between - CORRECT
ANSWER -{}


When using the switch decision-making statement the break statement is required. - CORRECT
ANSWER - False

Document information

Uploaded on
April 17, 2025
Number of pages
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

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.
STANFORDGRADESS
4.0
(238)
Sold
1590
Followers
108
Items
115164
Last sold
8 hours 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