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)

CSE 2221 Midterm 2 2025 UPDATE Verified Questions And Answers | With 100% Correct Answers graded A+ Guaranteed Success!!

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
05-07-2025
Written in
2024/2025

CSE 2221 Midterm 2 2025 UPDATE Verified Questions And Answers | With 100% Correct Answers graded A+ Guaranteed Success!!

Institution
CSE 2221
Course
CSE 2221

Content preview

CSE 2221 Midterm 2 2025 UPDATE Verified Questions And Answers |
CSE 2221 Midterm 2
With 100% Correct Answers graded A+ Guaranteed Success!!
Study online at https://quizlet.com/_643dbg

1. what is a natural number an integer greater than or equal to 0

2. in the instance method n.method- n; this
Name(arguments); ______ is called the
receiver and the corresponding dis-
tinguished formal parameter has the
name ______-

3. what does "#cat" mean the previous value of cat

4. what does m.add(k) do adds k to value of m (changes value of m but not
value of k)

5. what does m.subtract(k) do subtracts k from value of m (changes value of m but
not of k)

6. what does m.multiply(k) do multiplies m by value of k (changes value of m but
not of k)

7. what does NaturalNumber r = m.di- divides m by k and returns the remainder to variable
vide(k) do r

8. what does m.copyFrom(k) do copies value of k into value of m

9. what does int comp = m.compare- compares value of m to k; if m > k, comp gets set to
To(k) do 1, if equal, comp = 0 and if less than, comp = -1

10. what does m.multiplyBy10(d) do multiplies m by 10 then adds k

11. what does int r = m.divideBy10() do divides m by 10 and sets r equal to the remainder

12. boolean z = m.isZero() returns z to true if m is zero

13. what does m.clear() do sets value of m to zero

1/9

, CSE 2221 Midterm 2
Study online at https://quizlet.com/_643dbg

14. m.transferFrom(k) sets value of m = k and resets k to zero

15. String s = m.toString returns the string version of m to s (ex: if m = 143, s
= "143")

16. primitive types vs reference types primitive types are boolean, char, int, double; refer-
ence types are String, XMLTree, SimpleReader, etc.

17. primitive variable variable of a primitive type (int, double, boolean,
char)

18. reference variable variable of a reference type (XMLTree, String)

19. reference value vs object value object value is the actual value while reference value
is the memory address of the object

20. notation for reference value triangle with arrow pointing to object value

21. when you do String s = t, changing the changes the value of s
value of t ___________

22. when doing NaturalNumber n = z, changes the value of z
changing the value of n ________

23. immutable types vs mutable types immutable types (ex: String, XMLTree, etc.) values
cannot change but mutable types (SimpleRead-
er, NaturalNumber, etc.) values can change via a
method

24. what must you use to see if two .equals()
strings are equal

25. what are the only types that change natural numbers (if a method like increment is used)
when passed into a static method and arrays

2/9

Written for

Institution
CSE 2221
Course
CSE 2221

Document information

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

Subjects

$15.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
ExamVault

Get to know the seller

Seller avatar
ExamVault Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
33
Member since
1 year
Number of followers
1
Documents
253
Last sold
5 months ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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