View the step-by-step solution to:

Week 1 : Object-Oriented Programming - Quiz Time Remaining: Page 1 1.

This question was answered on Jan 19, 2013. View the Answer
Week 1 : Object-Oriented Programming - Quiz



Time Remaining:


Page 1







1. (TCO 1) The mechanism that allows you to combine data and the behavior for that data into a single unit is called a(n) _____. (Points : 2)
object
class
member
field





2. (TCO 1) Which of the following would be a more appropriate choice for a method in a Cup class? (Points : 2)
Drink()
Hot()
Break()
Color()





3. (TCO 1) Which of the following statements is/are true? (Points : 2)
A. Objects communicate through message passing.
B. An object is necessary to 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





4. (TCO 1) Which of the following would be a more appropriate choice for a data member in a Button class? (Points : 2)
resize
width
click
show





5. (TCO 1) _____ is the process of identifying important attributes and behaviors of an object. (Points : 2)
Class
Abstraction
Coding
All of the above
None of the above





6. (TCO 8) Most professional coding standards use _____ for data members. (Points : 2)
Camel case
Attribute case
no specific naming convention
Pascal case





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

class ClockType
{
private int hr;
public int min;
public int sec;

public void setTime(int x, int y, int z);
public int getTime();
public void printTime();
public void icrementSeconds();
public void incrementMinutes();
public void incrementHours();
public bool equalTime(ClockType clock);
}


(Points : 2)
7
3
10
2
5





8. (TCO 1) Assume we have two objects of a class. How may copies of the class’s attributes and methods exist in the instantiated objects? (Points : 2)
Only one copy, both objects always share it
Zero, the objects do not have attributes and methods
Two copies, each object has its own copy
Three copies





9. (TCO 1) Which of the following class relationships can be modeled through object-oriented programming? (Points : 2)
Is-a
Has-a
All of the above
None of the above





10. (TCO 1) Which of the following is a valid statement for a member method definition in C#? (Points : 2)
public int ComputeAverage { /*code goes here*/ }
public int ComputeAverage ( /*code goes here*/ )
public int ComputeAverage () { /*code goes here*/ };
public int ComputeAverage () { /*code goes here*/ }


Sign up to view the entire interaction

Top Answer

Hi Please find solution... View the full answer

8421707.docx

1. (TCO 1) The mechanism that allows you to combine data and the behavior for that data into a single unit is called a(n) _____. (Points : 2) object class member field 2. (TCO 1) Which of the...

This question was asked on Jan 19, 2013 and answered on Jan 19, 2013.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors and customizable flashcards—available anywhere, anytime.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access or to earn money with our Marketplace.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
  • -

    Flashcards

    Browse existing sets or create your own using our digital flashcard system. A simple yet effective studying tool to help you earn the grade that you want!

    Browse Flashcards