97%(174)168 out of 174 people found this document helpful
This preview shows page 1 - 3 out of 46 pages.
Programming Logic and Design, 8eSolutions 9-Programming Logic and Design, 8th EditionChapter 9Review Questions1.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 parameterand argumentare closely related, the difference is that argumentrefers to _____.5.A method’s interface is its _____.a.parameter listb.return typec.identifierd.all of the above6.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
Programming Logic and Design, 8e7.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 numyourMethod(string name, num code). The method’s type is _____.a.numb.stringc.numand stringd.void10.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 returnstatement 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 _____.