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
Exam (elaborations)

JAVA DATA STRUCTURES FINAL EXAM QUESTIONS WITH COMPLETE SOLUTIONS

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
30-07-2025
Written in
2024/2025

JAVA DATA STRUCTURES FINAL EXAM QUESTIONS WITH COMPLETE SOLUTIONS /.______ can be used to enforce the walls of an ADT. - Answer-Encapsulation /.A __________ allocates memory for an object and can initialize the object's data. - Answer-Constructor /.A linked list does not always have a head. - Answer-False /.A linked list with a null head is full. - Answer-False /.A recursive binary search algorithm always reduces the problem size by half at each recursive call. - Answer-True /.A recursive method always calls itself. - Answer-False /.A recursive solution can have more than one base case. - Answer-True /.A reference based implementation of the ADT list does impose a fixed maximum list length. - Answer-False /.A reference variable contains the location of an object in memory. - Answer-True /.A reference-based implementation of a linked list has a density factor of 1. - Answer-False /.A reference-based implementation of the ADT list does not shift items during insertion or deletion. - Answer-True /.A test for the base case enables recursive calls to stop. - Answer-True /.According to the basic tenets of software engineering, more than 50% of the cost and time for software is perpetuated within the maintenance phase of the software life cycle. - Answer-True /.ADT - Answer-Abstract Data Type /.An array of objects is actually an array of references to the objects. - Answer-True /.An array-based implementation of an ADT list: - Answer-requires less memory to store a data element than a reference-based implementation. /.An object encapsulates only data, not operations on that data. - Answer-False /.Check all of the following that are true of an array-based implementation of a linked list: - Answer-Generally has a fixed size /.Check all of the following that are true of an array-based implementation of a linked list: - Answer-Has a density factor of 1 /.CompareTo cannot compare two different types of numbers. - Answer-True /.Consider the following Java program. What is output by the program? public static void main( void ) { int a, b, result; a = 3; b = 4; result = value( a, b ); Sf("%dn",result); } public static int value( int x, int n ) { if ( n 0 ) return x * value( x, n - 1 ); else return 1; } - Answer-81 /.Constructor - Answer-Creates and initializes a new instance of a class

Show more Read less
Institution
Course

Content preview

JAVA DATA STRUCTURES FINAL EXAM QUESTIONS
WITH COMPLETE SOLUTIONS


/.______ can be used to enforce the walls of an ADT. - Answer-Encapsulation

/.A __________ allocates memory for an object and can initialize the object's data. -
Answer-Constructor

/.A linked list does not always have a head. - Answer-False

/.A linked list with a null head is full. - Answer-False

/.A recursive binary search algorithm always reduces the problem size by half at each
recursive call. - Answer-True

/.A recursive method always calls itself. - Answer-False

/.A recursive solution can have more than one base case. - Answer-True

/.A reference based implementation of the ADT list does impose a fixed maximum list
length. - Answer-False

/.A reference variable contains the location of an object in memory. - Answer-True

/.A reference-based implementation of a linked list has a density factor of 1. - Answer-
False

/.A reference-based implementation of the ADT list does not shift items during insertion
or deletion. - Answer-True

/.A test for the base case enables recursive calls to stop. - Answer-True

/.According to the basic tenets of software engineering, more than 50% of the cost and
time for software is perpetuated within the maintenance phase of the software life cycle.
- Answer-True

/.ADT - Answer-Abstract Data Type

/.An array of objects is actually an array of references to the objects. - Answer-True

/.An array-based implementation of an ADT list: - Answer-requires less memory to store
a data element than a reference-based implementation.

, /.An object encapsulates only data, not operations on that data. - Answer-False

/.Check all of the following that are true of an array-based implementation of a linked
list: - Answer-Generally has a fixed size

/.Check all of the following that are true of an array-based implementation of a linked
list: - Answer-Has a density factor of 1

/.CompareTo cannot compare two different types of numbers. - Answer-True

/.Consider the following Java program. What is output by the program?

public static void main( void )

{

int a, b, result;

a = 3;

b = 4;

result = value( a, b );

System.out.printf("%d\n",result);

}

public static int value( int x, int n )

{

if ( n > 0 )

return x * value( x, n - 1 );

else

return 1;

} - Answer-81

/.Constructor - Answer-Creates and initializes a new instance of a class

Written for

Course

Document information

Uploaded on
July 30, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.49
Get access to the full document:

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

Get to know the seller

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.
kartelodoc Harvard University
Follow You need to be logged in order to follow users or courses
Sold
143
Member since
1 year
Number of followers
7
Documents
8336
Last sold
4 days ago

Our store offers a wide selection of materials on various subjects and difficulty levels, created by experienced teachers. We specialize on NURSING,WGU,ACLS USMLE,TNCC,PMHNP,ATI and other major courses, Updated Exam, Study Guides and Test banks. If you don't find any document you are looking for in this store contact us and we will fetch it for you in minutes, we love impressing our clients with our quality work and we are very punctual on deadlines. Please go through the sets description appropriately before any purchase and leave a review after purchasing so as to make sure our customers are 100% satisfied. I WISH YOU SUCCESS IN YOUR EDUCATION JOURNEY

Read more Read less
3.3

25 reviews

5
8
4
2
3
8
2
3
1
4

Recently viewed by you

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