Jan 13, 2018 sample paper

How many copies of each class’s attributes and methods exist in the instantiated objects?

This paper concentrates on the primary theme of How many copies of each class’s attributes and methods exist in the instantiated objects? in which you have to explain and evaluate its intricate aspects in detail. In addition to this, this paper has been reviewed and purchased by most of the students hence; it has been rated 4.8 points on the scale of 5 points. Besides, the price of this paper starts from £ 45. For more details and full access to the paper, please refer to the site.

devry cis247 week 1 quiz latest 2016 may

1.
Question : (TCO 1) The components of a class are called _____ and _____.

elements;
objects

attributes;
methods

objects;
instantiations

properties;
descriptions

Question
2. Question : (TCO 1) Which of the following would be the most appropriate
choice for a method in a Cup class?

drink()

hot()

break()

color()

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

A.
Objects communicate through message passing.

B.
An object must be defined before you can create a class.

C.
The state of an object should not be hidden.

D.
Implementation details should be visible through the interface of a class.

A
and C

All
are true

None
are true

Question
4. Question : (TCO 1) Which of the following would be the most appropriate
choice for a data member in a Screen class?

dimensions

turnOff

refresh

activateScreenSaver

Question
5. Question : (TCO 1) The property of _____ describes the packaging of state
and behavior together in an object.

data
hiding

abstraction

encapsulation

All
of the above

None
of the above

Question
6. Question : (TCO 8) Most professional coding standards use _____ for class
names.

underscores
along with all upper case words

Method
Class case

no
specific naming convention

Pascal
case

Question
7. Question : (TCO 1) Examine the ClockType class definition. How many
attributes does it contain?

class
ClockType

{

public
void setTime(int hour, int min, int sec);

public
int getTime();

public
void printTime();

private
int hr;

public
int min;

public
int sec;

}

2

3

9

6

An
average of 5 because (7+3)/2 = 5

Question
8. Question : (TCO 1) Assume we have two classes and have instantiated an
object from each class. How many copies of each class’s attributes and methods
exist in the instantiated objects?

Two
copies, one copy of the first class and one of the second

Zero,
the objects do not have attributes and methods

Only
one copy and both objects share it

None
of the above

Question
9. Question : (TCO 1) Both _____ and _____ allow for code reuse and the
building of more complex systems.

inheritance;
composition

UML
diagrams; serialization

messaging;
object behaviors

None
of the above

Question
10. Question : (TCO 1) Which of the following is a valid statement for a method
definition in Java?

public
int computeAverage {

return
1;

}

public
int computeAverage (

return
1;

)

public
int computeAverage () {

return
1;

};

public
int computeAverage () {

return
1;

}

devry cis247 week 2 quiz latest 2016 may

1.
Question : (TCO 2) Only those class members which are part of the interface of
the class should be declared as _____.

open

banned

private

public

Question
2. Question : (TCO 2) A public accessor is usually paired with a public _____
to allow an outside class to set and retrieve the value of an object’s
attribute.

constructor

mutator

getter

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, while 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:

A.
“Please bring me chicken soup”

B.
“Can you tell me how to make macaroni and cheese?”

C.
“How many hours do you work?”

All
of the above

Only
A and B

Question
5. Question : (TCO 5) The purpose of a(n) _____ is to initialize the object’s
data members when an object is instantiated.

method

constructor

class

destructor

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

A.
public void roll() ; public int move(int x)

B.
public int charge(int x) ; public int charge(int y)

C.
public int subtract() ; public void subtract()

All
of the above

Only
B

Question
7. Question : (TCO 5) Consider the following class definition.

public
class Rose

{

private
int petals;

private
double cost;

public
Rose()

{

petals
= 30;

cost
= 0.0;

}

public
Rose(int p)

{

petals
= p;

cost
= 0.0;

}

public
int getPetals()

{

return
petals;

}

public
void setCost(int amount)

{

cost
= amount;

}

}

Which
of the following are true?

(i)
The attribute cost can be set to a new value, by a user of this class.

(ii)
System.out.println (“The rose has: ” + Rose.getPetals()); is a valid
statement.

(iii)
There are overloaded constructors in the class.

i.

ii

Only
i and iii

None
are true

All
are true

Question
8. Question : (TCO 2) Assume a class has a data member called ‘color’. Can
another class have a data member called ‘color’?

Yes,
as long as the data member is used in the same way.

No,
this is not possible because the compiler would not know which data member to
use.

Yes,
but only if the classes are not in the same namespace.

None
of the above

Question
9. Question : (TCO 5) Which error handling technique is the least appropriate
when developing an application?

Check
for potential problems and abort the application when a problem is encountered.


0% Plagiarism Guaranteed & Custom Written, Tailored to your instructions


International House, 12 Constance Street, London, United Kingdom,
E16 2DQ

UK Registered Company # 11483120


100% Pass Guarantee

Order Now

STILL NOT CONVINCED?

We've produced some samples of what you can expect from our Academic Writing Service - these are created by our writers to show you the kind of high-quality work you'll receive. Take a look for yourself!

View Our Samples

corona virus stop
FLAT 25% OFF ON EVERY ORDER.Use "FLAT25" as your promo code during checkout