Ch10_Logic8e_Solutions - Programming Logic and Design 8e...

Info icon This preview shows pages 1–4. Sign up to view the full content.

Programming Logic and Design, 8e Solutions 10-1 Programming Logic and Design, 8th Edition Chapter 10 Review Questions REVIEW QUESTIONS 1. Which of the following means the same as object ? a. class b. instance c. field d. category 2. Which of the following means the same as instance variable ? 3. A program that instantiates objects of another prewritten class is a(n) __________. 4. The relationship between an instance and a class is a(n) _____ relationship. 5. Which of these does not belong with the others? a. instance variable b. attribute c. field d. object 6. The process of acquiring the traits of one’s predecessors is __________.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Programming Logic and Design, 8e Solutions 10-2 7. When discussing classes and objects, encapsulation means that _____. 8. Every class definition must contain __________. 9. Assume that a working program contains the following statement: myDog.setName("Bowser") Which of the following do you know? a. setName() is a public method b. setName() accepts a string parameter c. both of the above d. none of the above 10. Assume that a working program contains the following statement: name = myDog.getName() Which of the following do you know? 11. A class diagram _____. 12. Which of the following is the most likely scenario for a specific class? 13. An instance method __________. a. is static
Image of page 2
Programming Logic and Design, 8e Solutions 10-3 b. receives a this reference c. both of these d. none of these 14. Assume that you have created a class named Dog that contains a data field named weight and an instance method named setWeight() . Further assume that the setWeight() method accepts a numeric parameter named weight . Which of the following statements correctly sets a Dog ’s weight within the setWeight() method?
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern