CIS 211 MODULE 1 CHECK YOUR UNDERSTANDING Check your understanding 25 out of 25 1. An ADT's operations are known as its ______. a. axioms b. methods c. variables d. interfaces Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 2. A(n) ______ can be used to precisely specify the behavior of each of the operations of an ADT. a. exception b. data structure c. axiom d. client Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1E:Explore the ADT Bag. 1 3. The insertion operation of the ADT list can insert new items ______. a. only at the front of the list b. only at the end of the list c. only in the middle of the list d. into any position of the list Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1D:Examine abstract data types. 1 4. Which of the following is true about runtime exceptions? a. they must be handled locally b. they must be explicitly thrown from the method c. they are used in situations where the method has encountered a serious problem d. they can often be prevented by fail-safe programming Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 5. An ADT's ______ govern(s) what its operations are and what they do. a. specifications b. implementation c. documentation d. data structure Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1C:Analyze specifications. 1 6. Which of the following is true about a constructor in C++? a. all constructors have a return type of void b. a constructor cannot have parameters c. a constructor has the same name as the class d. a class can only have a single constructor Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1C:Analyze specifications. 1 7. In C++, each class definition should be placed in a(n) ______. a. implementation file b. header file c. namespace d. package Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 8. In the following list: John, Kate, Fred, Mark, Jon, Adam, Drew which element is the tail of the list? a. John b. Mark c. Drew d. Adam Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1C:Analyze specifications. 1 9. A(n) ______ is an instance of a class. a. method b. data field c. interface d. object Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1A:Identify principles of object-oriented concepts. 1 10. A function can indicate that an error has occurred by ______ an exception. a. throwing b. catching c. implementing d. declaring Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 11. Which of the following is true about a destructor in C++? a. a class can have several destructors b. the compiler will generate a destructor if the programmer does not provide one c. a programmer must provide a destructor for every class d. a destructor destroys all instances of a class Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1C:Analyze specifications. 1 12. The specifications of an ADT's operations indicate ______. a. what the operations do b. how to implement the operations c. how to store the data in the ADT d. how to carry out the operations Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1D:Examine abstract data types. 1 13. In the ADT list, when an item is deleted from position i of the list, ______. a. the position of all items is decreased by 1 b. the position of each item that was at a position smaller than i is decreased by 1 c. the position of each item that was at a position greater than i is decreased by 1 d. the position of each item that was at a position smaller than i is increased by 1 while the position of each item that was at a position greater than i is decreased by 1 Hint:Chapter 1 SLO1:Examine software development and data abstraction. LO1D:Examine abstract data types. 1 14. A(n) ______ allows two modules to communicate with each other. a. data structure b. axiom c. interface d. client Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1E:Explore the ADT Bag. 1 15. The items in the ADT list are referenced by ______. a. name b. value c. position number d. position name Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1D:Examine abstract data types. 1 16. Which of the following operations of the ADT list changes the list? a. remove b. is Empty c. size d. get Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1E:Explore the ADT Bag. 1 17. To ______ an exception means to deal with the error condition. a. declare b. catch c. implement d. try Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 18. The ADT sorted list inserts and deletes items by their ______. a. name b. value c. position name d. position number Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1E:Explore the ADT Bag. 1 19. When defining class A so that any of its instances can invoke any of the publicly defined methods of class B, the keyword ______ precedes the name of class B. a. public b. global c. static d. final Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 20. A(n) ______ is a class that inherits the members of another class. a. base class b. superclass c. abstract class d. subclass Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 21. A C++ class contains data members and ______. a. clients b. interfaces c. methods d. data structures Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 22. In the following list: John, Kate, Fred, Mark, Jon, Adam, Drew which element does not have a predecessor? a. John b. Mark c. Drew d. Kate Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1C:Analyze specifications. 1 23. A client program depends solely on the ______ of the ADT. a. data members b. structure c. implementation d. behavior Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1E:Explore the ADT Bag. 1 24. C++ provides a mechanism for logically grouping class definitions and other declarations into a common declarative region known as a(n) ______. a. namespace b. interface c. header d. package Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1B:Explain how to achieve a better solution. 1 25. A(n) ______ is a C++ construct that enables a programmer to define a new data type. a. class b. method c. data field d. object Hint: Chapter 1 SLO1:Examine software development and data abstraction. LO1C:Analyze specifications. 1 Computer Science Assignment Help, Computer Science Homework help, Computer Science Study Help, Computer Science Course Help