97%(230)222 out of 230 people found this document helpful
This preview shows page 1 - 4 out of 31 pages.
Programming Logic and Design, 8eSolutions 10-1Programming Logic and Design, 8th EditionChapter 10Review QuestionsREVIEW QUESTIONS1.Which of the following means the same as object?a. classb. instancec. fieldd. category2.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 variableb. attributec. fieldd. object6.The process of acquiring the traits of one’s predecessors is __________.
Programming Logic and Design, 8eSolutions 10-2d. orientation7.When discussing classes and objects, encapsulationmeans 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 methodb. setName()accepts a string parameterc. both of the aboved. none of the above10.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
Programming Logic and Design, 8eSolutions 10-3b. receives a thisreferencec. both of thesed. none of these14.Assume that you have created a class named Dogthat contains a data field named weightand an instance method named setWeight(). Further assume thatthe setWeight()method accepts a numeric parameter named weight. Which of the following statements correctly sets a Dog’s weight within the setWeight()method?