100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
The - indicates a class' private item. True False - answer true The + indicates additional private items. True False - answer false In addNumYears(), which line adds the parameter numYears to the existing value of field numYears? this.numY $13.49   Add to cart

Exam (elaborations)

The - indicates a class' private item. True False - answer true The + indicates additional private items. True False - answer false In addNumYears(), which line adds the parameter numYears to the existing value of field numYears? this.numY

 0 view  0 purchase
  • Course
  • CSC - Cyber Secure Coder
  • Institution
  • CSC - Cyber Secure Coder

The - indicates a class' private item. True False - answer true The + indicates additional private items. True False - answer false In addNumYears(), which line adds the parameter numYears to the existing value of field numYears? Years = Years + numYears; Years = numYears + ...

[Show more]

Preview 2 out of 12  pages

  • September 22, 2024
  • 12
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSC - Cyber Secure Coder
  • CSC - Cyber Secure Coder
avatar-seller
Pogba119
CSC 222 exam 3 Questions and Answers
The - indicates a class' private item.
True
False - answer true

The + indicates additional private items.
True
False - answer false

In addNumYears(), which line adds the parameter numYears to the existing value of
field numYears?

this.numYears = this.numYears + numYears;
this.numYears = numYears + numYears;
numYears = this.numYears + numYears; - answer a

In addNumYears(), which line assigns the field numYears with 0?

numYears = 0;
this(numYears) = 0;
this.numYears = 0; - answer c

In addNumYears(), which line assigns the field numYears with the parameter
numYears?

numYears = this.numYears;
this.numYears = numYears; - answer b

Long id = 12398L;

Autoboxing
Unboxing
Both - answer a

Boolean lowStock = itemCount < 10;
Autoboxing
Unboxing
Both - answer a

Assume newRate is a double and adjustRate is a Double.
newRate *= adjustRate;

Autoboxing

, Unboxing
Both - answer b

Assume newTime is a double, and totalTime is a Double.
totalTime = totalTime + newTime;
Autoboxing
Unboxing
Both - answer c

Assume the calcResult() method returns an Integer and has the signature
calcResult(Integer num1, Integer num2), and that variables xVal and yVal are of type
int.

Integer zVal = calcResult(xVal, yVal);

Autoboxing
Unboxing
Both - answer a

API is short for ___.
Authoring Program Instructions
Applied Programming Implementation
Application Programming Interface
Automated Program Instructions - answer c

What is the blueWidget's inStock at the end of main( )?
public class Widget {
private int inStock;
public Widget() {
inStock = 10;
}
public void addInventory(int amt) {
inStock = inStock + amt;
}
public static void main(String [] args){
Widget blueWidget = new Widget();
Widget greenWidget = new Widget();
blueWidget.addInventory(15);
greenWidget.addInventory(5);
}
}
}

25
10
30

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 Pogba119. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72349 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
$13.49
  • (0)
  Add to cart