Science question

Assignment Help Basic Computer Science
Reference no: EM13762262

Question 1.1.Only those class members that are presented to the users of the class are part of the ______ of the class.

interface

implementation

constructors

superclass

Question 2.2.A private attribute can have an associated public _____ to allow an outside class to retrieve its value.

constructor

destructor

getter

mutator

Question 3.3. Which of the following statements is/are false?

A change to the implementation should not require a change to the user's code.

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.

When interacting with the interface of an object, you need to know what the code looks like inside the methods, which comprise the interface.

All of the above

None of the above

Question 4.4. 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 cheese?"

"How many hours do you work?"

All of the above

Only A and B

Question 5.5.The purpose of a(n) _____ is to initialize the object's data members when an object is instantiated.

methods

constructor

class

destructor

Question 6.6.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.7.Consider the following class definition.

class Flower

{

private:

string color;

double cost;

public:

Flower()

{

color = "red";

cost = 0.0;

}

Flower(string c)

{

color = c;

cost = 0.0;

}

void setColor(string c)

{

color = c;

}

void setCost(int amount)

{

cost = amount;

}

}

Which of the following is/are true?

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

of this class

(ii) You can write cout<<"The flower is: " << Flower.setColor();

(iii) A default constructor is provided.

Only i and iii

None are true

All are true

Question 8.8.Assume a class has a method called ‘ComputeAverage()'. Can another class have a method called ‘ComputeAverage()' ?

Yes, as long as the method performs the same or similar task.

Yes, this is possible.

No, because the compiler cannot distinguish the appropriate method to call.

None of the above

Question 9.9. Which of the following statements is/are true?

Most object-oriented languages provide a feature called exceptions.

One error handling strategy is to check for problems and attempt to recover.

In a try/catch block, if an exception is thrown within the try block, the catch block will handle it.

All of the above

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

3

1

4

2

Reference no: EM13762262

Questions Cloud

Monitoring our home planet : The Internet is a powerful tool that provides the ability to monitor natural phenomena and disasters that happen all over planet Earth.
Packet-switched and circuit-switched : Packet-switched and circuit-switched are two standards utilized by wide area networks. In your Discussion Board posting of 4-6 paragraphs, address the following:
Converting from fahrenheit to celsius : Converting from Fahrenheit to Celsius, Create a Memo using the Memo Template for each of the tasks. The document should contain
Appropriate basis of overhead application : What would be the more appropriate basis of overhead application: printing press machine hours or direct labor hours? Given the choice of driver, are there any implications to consider for under or over applied overhead?
Science question : Only those class members that are presented to the users of the class are part of the ______ of the class.
Discuss the elements of your own poem : Discuss the elements of your own poem. Consider elements such as persona, image, meter, rhythm, rhyme, metaphor, symbol, allegory, mood, and voice.
Direct and indirect presentation of cash flows : Write a 350-word response regarding the differences between the direct and indirect presentation of cash flows. Why does the Financial Accounting Standards Board allow both methods? Which do you prefer? Why?
What would be the costs of each action : What 1 policy could you use to reduce the total amount of emissions and why do you think the policy would reduce the total amount of emissions?
Information triage is the process of : Information triage is the process of sorting through information you have gathered to determine what is most useful

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd