Ch09_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 9- Programming Logic and Design, 8th Edition Chapter 9 Review Questions 1. Which of the following is true? a. A program can call one method at most. b. A method can contain one or more other methods. c. A program can contain a method that calls another method. d. All of the above are true. 2. Which of the following must every method have? 3. Which of the following is most closely related to the concept of local ? 4. Although the terms parameter and argument are closely related, the difference is that argument refers to _____. 5. A method’s interface is its _____. a. parameter list b. return type c. identifier d. all of the above 6. When you write the declaration for a method that can receive a parameter, which of the following must be included in the method declaration? 1
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 9- 7. When you use a variable name in a method call, it _____ as the variable in the method header. 8. Assume you have written a method with the header void myMethod(num a, string b) . Which of the following is a correct method call? 9. Assume you have written a method with the header num yourMethod(string name, num code) . The method’s type is _____. a. num b. string c. num and string d. void 10. Assume you have written a method with the header string myMethod(num score, string grade) . Also assume you have declared a numeric variable named test . Which of the following is a correct method call? 11. The value used in a method’s return statement must _____. 12. When a method receives a copy of the value stored in an argument used in the method call, it means the variable was _____. 2
Image of page 2
Programming Logic and Design, 8e Solutions 9-
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.
  • Fall '15
  • Subroutine, ISBN, NUM, Void type

{[ 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