C1S355 Week 2 Quiz – Guaranteed 100% score

Lab Price = $10
Please feel free to send us your queries at: support@iqrajavaid.com
Payment Methods

Add to Cart

Buy Now

View Cart


Problem Statement
CIS355 Week 2 Quiz

1. (TCOs 1–8) What is the output of the following program?
import java.util.Date;
public class Test {
public static void main(String[ ] args) {
Date date = new Date(1234567);
m1(date);
System.out.print(date.getTime() + ” “);
m2(date);
System.out.println(date.getTime());
}
public static void m1(Date date) {
date = new Date(7654321);
}
public static void m2(Date date) {
date.setTime(7654321);
}
} (Points : 3)
1234567 1234567
1234567 7654321
7654321 7654321
7654321 1234567

Question 2.2. (TCOs 1–8) Which is the advantage of encapsulation? (Points : 3)
Only public methods are needed.
Making the class final causes no consequential changes to other code.
It changes a class’s contract without changing the implementation and causes no consequential changes to other code.
It changes the implementation without changing a class’s contract and causes no consequential changes to other code.

Question 3.3. (TCOs 1–8) Suppose you wish to provide an accessor method for a Boolean property finished, what should the signature of the method be? (Points : 3)
public void isFinished()
public boolean isFinished()
public boolean getFinished()
public void getFinished()

Question 4.4. (TCOs 1–8) Given the declaration Circle x = new Circle(), which of the following statement is most accurate? (Points : 3)
x contains an int value.
You can assign an int value to x.
x contains an object of the Circle type.
x contains a reference to a Circle object.

Question 5.5. (TCOs 1–8) _____ represents an entity in the real world that can be distinctly identified. (Points : 3)
A class
An object
A data field
A method

Question 6.6. (TCOs 1–8) Which of the following statements is false? (Points : 3)
An application that requires precise floating-point calculations, such as those in financial applications, should use class BigDecimal from package java.math.
We use class NumberFormat for formatting numeric values as locale-specific strings.
In the U.S. locale, the value 15467.82 would be formatted as 15,467.82, whereas in many European locales it would be formatted as 15.467,56.
The BigDecimal method format receives a double argument and returns a BigDecimal object that represents the exact value specified.

Question 7.7. (TCOs 1–8) Which statement is false? (Points : 3)
The compiler always creates a default constructor for a class.
If a class’s constructors all require arguments and a program attempts to call a no-argument constructor to initialize an object of the class, a compilation error occurs.
A constructor can be called with no arguments only if the class does not have any constructors or if the class has a public no-argument constructor.

Question 8.8. (TCOs 1–8) A programmer-defined constructor that has no arguments is called a(n) _____ (Points : 3)
empty constructor.
no-argument constructor.
default constructor.
null constructor.

Question 9.9. (TCOs 1–8) Set methods are also commonly called _____ methods, and get methods are also commonly called _____ methods. (Points : 3)
query, mutator
accessor, mutator
mutator, accessor
query, accessor

Question 10.10. (TCOs 1–8) When implementing a method, use the class’s set and get methods to access the class’s _____ data. (Points : 3)
public
private
protected
All of the above

Relevant Material
Screenshots
Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at support@iqrajavaid.com.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at support@iqrajavaid.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at support@iqrajavaid.com.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Payment Details

 

Lab Price = $10
Please feel free to send us your queries at: support@iqrajavaid.com
Payment Methods

Add to Cart

Buy Now

View Cart

Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on support@iqrajavaid.com
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.


Leave a Reply