A class may have ________ default constructor(s) and ________ destructor(s).

Get full access to Object Oriented Programming with C++, Second Edition and 60K+ other titles, with free 10-day trial of O'Reilly.

There's also live online events, interactive content, certification prep materials, and more.

Term
13.17. The two common programming methods in practice today are _________ and _________.Definition
Procedural and Object OrientatedTerm
13.18. _________ programming is centered around functions or procedures.Definition
Term
13.19. _________ programming is centered around objects.Definition
Term
13.20. _________ is an object s ability to contain and manipulate its own data.Definition
Term
13.21. In C++ the _________ is the construct primarily used to create objects.Definition
Term
13.22. A class is very similar to a(n) _________.Definition
Term
13.23. A(n) _________ is a key word inside a class declaration that establishes a member's accessibility.Definition
Term
13.24. The default access specification of class members is _________.Definition
Term
13.25. The default access specification of a struct in C++ is _________.Definition
Term
13.26. Defining a class object is often called the _________ of a class.Definition
Term
13.27. Members of a class object may be accessed through a pointer to the object by using the _________ operator.Definition
The Arrow is the Pointer Operator -->Term
13.28. If you were writing the declaration of a class named Canine, what would you name the file it was stored in? _________Definition
Term
13.29. If you were writing the external definitions of the Canine class s member functions, you would save them in a file named _________.Definition
Term
13.30. When a member function s body is written inside a class declaration, the function is _________.Definition
Term
13.31. A(n) _________ is automatically called when an object is created.Definition
Term
13.32. A(n) _________ is a member function with the same name as the class.Definition
Term
13.33. _________ are useful for performing initialization or setup routines in a class object.Definition
Term
13.34. Constructors cannot have a(n) _________ type.Definition
Term
13.35. A(n) _________ constructor is one that requires no arguments.Definition
Term
13.36. A(n) _________ is a member function that is automatically called when an object is destroyed.Definition
Term
13.37. A destructor has the same name as the class, but is preceded by a(n) _________ character.Definition
Term
13.38. Like constructors, destructors cannot have a(n) _________ type.Definition
Term
13.39. A constructor whose arguments all have default values is a(n) _________ constructor.Definition
Term
13.40. A class may have more than one constructor, as long as each has a different _________.Definition
Term
13.41. A class may only have one default _________ and one _________.Definition
constructor and destructorTerm
13.42. A(n) _________ may be used to pass arguments to the constructors of elements in an object array.Definition
Term
13.51. T F Private members must be declared before public members.Definition
Term
13.52. T F Class members are private by default.Definition
Term
13.53. T F Members of a struct are private by default.Definition
Term
13.54. T F Classes and structures in C++ are very similar.Definition
Term
13.55. T F All private members of a class must be declared together.Definition
Term
13.56. T F All public members of a class must be declared together.Definition
Term
13.57. T F It is legal to de ne a pointer to a class object.Definition
Term
13.58. T F You can use the new operator to dynamically allocate an instance of a class.Definition
Term
13.59. T F A private member function may be called from a statement outside the class, as long as the statement is in the same program as the class declaration.Definition
Term
13.60. T F Constructors do not have to have the same name as the class.Definition
Term
13.61. T F Constructors may not have a return type.Definition
Term
13.62. T F Constructors cannot take arguments.Definition
Term
13.63. T F Destructors cannot take arguments.Definition
Term
13.64. T F Destructors may return a value.Definition
Term
13.65. T F Constructors may have default arguments.Definition
Term
13.66. T F Member functions may be overloaded.Definition
Term
13.67. T F Constructors may not be overloaded.Definition
Term
13.68. T F A class may not have a constructor with no parameter list, and a constructor whose arguments all have default values.Definition
Term
13.69. T F A class may only have one destructor.Definition
Term
13.70. T F When an array of objects is de ned, the constructor is only called for the rst element.Definition
Term
13.71. T F To nd the classes needed for an object-oriented application, you identify all of the verbs in a description of the problem domain.Definition
Term
13.72. T F A class s responsibilities are the things the class is responsible for knowing, and actions the class must perform.Definition

How many default constructors can a class have?

A default constructor is a constructor that is called without any arguments. It is not possible to have more than one default constructor.

What is the return type of constructor in C++?

Constructor does not have a return value, hence they do not have a return type.

When a class contains an instance of another class?

When a class uses object of another class this is called composition.

What is the return type for constructors quizlet?

A constructor has no return type, not even void.