100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSE 2221 Midterm 2 Exam Questions and answers $8.49   Add to cart

Exam (elaborations)

CSE 2221 Midterm 2 Exam Questions and answers

 7 views  0 purchase
  • Course
  • CSE 2221
  • Institution
  • CSE 2221

CSE 2221 Midterm 2 Exam Questions and answers

Preview 2 out of 5  pages

  • September 26, 2024
  • 5
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSE 2221
  • CSE 2221
avatar-seller
Nursephil2023
CSE 2221 Midterm 2 Exam Questions and
answers
Declared Type - - Also known as static type

Left side of Declaration

Interface Type

Cannot change during runtime

- Object Type - - Also known as Dynamic type, because this part of a
variable can change during runtime

Right side of declaration statement

Constructor

Anything that implements interface can be used for this

Type used with overriden method calls

- How to Override a method? - - Must be a class extending a class

(e.g. myNaturalNumber extends NaturalNumber2)

Use @override
Keep same method header, change method body

- Extends - - Relationship between two classes or two interfaces

With classes, retains the method bodies

With interfaces, retains the method contracts

- Implements - - Relationship between class and interface
Class _______________s an interface
Class may do this with more than one interface
More than one class can do this with one interface

- What kind of variable is NaturalNumber? - - A reference type, points to an
object value

, - How do i initialize a natural number with a number bigger than the max
value of an int? - - Use another natural number, a string with said number,
or math to get there

- What is the default parameter mode when none is specified? - - Restores
Mode

- Restores - - Returns input variable to its original value at the end of the
method

- Updates - - Changes the value of the input variable based on its original
value

- Clears - - Returns the value of the input variable to a default value, usually
zero

- NaturalNumber Compareto Results - - positive if A > B
0 if A = B
Negative if A < B

- Replaces - - Changes the value of the input variable regardless of the
orgiinal value

- Immutable Reference - - Has a reference value and an object value

Variable value cannot be changed in a method cal]
Value can be reassigned, but not directly changed by a method call

Example: String, XMLTree

- Mutable Reference - - Has a reference value and an object value

Example: NaturalNumber, simpleReader, simpleWriter, Array

- Primitive type - - Has a value that can be directly changed, the variable is
the value

Double, int, char, boolean

- Test cases should include - - Routine Cases
Challenging Cases
Boundary Cases

They also must satisfy the preconditions

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Nursephil2023. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $8.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76945 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$8.49
  • (0)
  Add to cart