Devry CIS247 Week 2 Quiz Latest 2016 Jan.

1. Question : (TCO 2) Only those class members which are presented to
the users of the class are part of the _____ of the class.

Don't use plagiarized sources. Get Your Custom Essay on
Devry CIS247 Week 2 Quiz Latest 2016 Jan.
Just from $10/Page
Order Essay





Question 2. Question
: (TCO 2) Getters and setters
are sometimes called _____ methods and _____ methods, respectively.

mutator; accessor

accessor; mutator

retrieval; putter

None of the above

Question 3. Question
: (TCO 2) Which of the following
statements is/are true?

If a method is public, it is considered part
of the class implementation.
If you declare an attribute as private, you
do not have to worry about tracking down every piece of code that might have
changed the attribute when debugging.
While designing a class you add as many
interfaces as possible, trying to cover all possible future user needs.
All of the above

None of the above

Question 4. Question
: (TCO 2) A Waiter is
responsible for taking the order from the Customer based on the menu, informing
the Chef of the order and delivering the requested food back to the Customer. A
Chef is responsible for preparing the food and notifying the Waiter when the
food is ready. The Customer is responsible for placing an order from the menu.
In identifying the interface of the Waiter object, which of the following would
you consider as (an) appropriate message(s) the Waiter should respond to?

“Please bring me chicken soup.”

“Can you tell me how to make macaroni and

“How many hours do you work?”

All of the above

Only A and B

Question 5. Question
: (TCO 5) One of the purposes of
a(n) _____ is to release resources back to the system when the object is not
used anymore.




instance variable

Question 6. Question
: (TCO 5) Which of the following
method pairs are not examples of method overloading?

public void Mark() ; public int Move(int x)

public int Cook(int x) ; public void Cook(int
x, double y)

public int Add(int x) ; public int Add(int y)

All of the above

Only A and C

Question 7. Question
: (TCO 5) Consider the following
class definition.
public static void Main(string[] args)
Building ranch =
new Building();
public class Building
private int
private double

public Building()
floors = 2;
cost =
public int
public double
return cost;

public double
Cost(int extra)
return cost
+ extra;

Which of the following is/are true?

(i) The data member floors can be set to a new value, by a
of this class.
(ii) The default constructor initializes the state
(iii) We could use Building.Floors() to access the data

Only (i)

Only (ii)

All (i), (ii), and (iii) are true

None are true

Question 8. Question
: (TCO 2) Can two methods each
define a local variable with the same name?

Yes, as long as the variable is used in the
same way.

No, this is not possible because the compiler
would not know which variable to use.
Yes, but only if the methods have the same

None of the above

Question 9. Question
: (TCO 5) Which error handling
technique(s) is(are) not appropriate when developing an application?

Check for potential problems and abort the
application when a problem is encountered.
Ignore an error in the application.

Check for potential problems, catch the
mistake, and try to fix it.

All of the above

Question 10. Question
: (TCO 2) Assume a class
contains two non-static data members and one static data member. If two objects
have been instantiated from the class, how many copies of the static data
member exist?





Order your essay today and save 10% with the discount code ESSAYHELP