100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSE 2231 Final Questions and Answers Fully Solved

Rating
-
Sold
-
Pages
14
Grade
A+
Uploaded on
04-07-2025
Written in
2024/2025

Exam of 14 pages for the course CSE at CSE (CSE 2231 Final)

Institution
CSE
Course
CSE









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CSE
Course
CSE

Document information

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

Content preview

CSE 2231 Final

Abstract class - answerA "partial" or "incomplete" class that contains bodies for some
but (typically) not all of the methods of the interfaces it claims to implement

Factoring out common code - answer Method bodies that can be written once— and
work for any implementation of Natural Number Kernel because they are programmed
to that interface—have been factored out into an abstract class

Can you instantiate an abstract class? - answer No - You can't use an abstract class
like a normal class and create objects from it

UUT - answerUnit under testing

How to achieve single-point control over change in this situation - answer"Re-route" all
UUT constructor calls to another method, which then calls the UUT constructor, so only
the body of that one method needs to be changed to accommodate a different UUT

Class ending with "L" - answerKernel class that directly represents the new type using a
component from Java libraries

Instance variable - answerThere is a distinct variable (with the same name) for each
instance of the class in which it is declared

Criteria for kernel implementation - answer1. Easy to understand and write
2. More efficient

Sequence3 on Stack - answerSequence represented as 2 stacks, left and right.
Sequence = rev(left) + right
Representation of sequence is 2 stacks "facing each other" in the middle of sequence

Client view - answerMathematical models, method contracts
Kernel interface shows WHAT the software does

Implementer view - answerData representation, algorithms
Kernel class shows HOW the software does it

Abstract state space - answerThe set of all possible math model values as seen by the
client

Concrete state space - answerThe set of all possible math model values of the data
representation

, Abstraction function - answerHow to interpret any concrete value (that satisfies the
representation invariant) as an abstract value?
@correspondence

Representation invariant - answerWhat configurations of values of the instance
variables can arise?
@convention

Why hashing? - answer1. Can be quickly identified
2. Must contain the item

T/F: Nodes in a linked list must always have consecutive memory addresses? -
answerFalse

T/F: Nodes in a linked list can be accessed in constant time? - answerFalse

T/F: Nodes in a linked list require at least one smart node? - answerFalse

T/F: Nodes in a linked list can be accessed sequentially in linear time? - answerTrue

T/F: The process of building a heap will completely sort its elements? - answerFalse

T/F: A subroutine is needed to adjust the root of a subtree to its proper position,
assuming the subtree is a heap except for its root - answerTrue

T/F: Heaps are parameterized by a type and an ordering process? - answerTrue

T/F: A heap is a binary tree with extra constraints on its shape and organization -
answerTrue

Collection type definition - answerAny type whose abstract mathematical model
involves: string, set, multiset, tree, binary tree

Collection type examples - answerArray, queue, set, sequence, stack, map, sorting
machine

Array pros - answer-Direct access
-Constant time access (regardless of length)

Array cons - answer-Fixed size; can run out of room
-Fixed size; initialization might be expensive if entries go unused
-Adding/removing entires in the middle requires moving other entries, which is slow

Array is represented by... - answerA contiguous block of memory locations with
consecutive memory addresses so the memory address of the entry at index i can be
directly calculated from the memory address of the first entry, by using simple arithmetic

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.
julianah420 Phoenix University
View profile
Follow You need to be logged in order to follow users or courses
Sold
652
Member since
2 year
Number of followers
323
Documents
33704
Last sold
1 day ago
NURSING,TESTBANKS,ASSIGNMENT,AQA AND ALL REVISION MATERIALS

On this page, you find all documents, package deals, and flashcards offered by seller julianah420

4.3

147 reviews

5
101
4
20
3
7
2
5
1
14

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

Frequently asked questions