True and False questions on C++ classes
1. C++ classes have a constructor that has the same name as the class.
2. C++ constructors are called automatically.
3. You must write code for the C++ constructor of every class you write.
4. Methods of a C++ class can create or add additional instance variables to the class.
5. Methods may be declared in the private section of the class definition.
6. Instance variables must be declared in the private section of the class definition.
7. A compiler error is generated if a method has a variable with the same name as an instance variable.
8. Methods may be written inline in the header file.
1. C++ classes have a constructor that has the same name as the class. True 2. C++ constructors are called automatically. True 3. Constructor generates default constructor. False 4. Methods of a C++ class can create or add additional local variables to the class. False 5. Methods may be declared in the private section of the class definition. True 6. Instance variables may declared in public section also. False 7. A compiler error won't is generated if a method has a variable with the same name as an instance variable. False 8. Methods may be written inline in the header file. True
True and False questions on C++ classes 1. C++ classes have a constructor that has the...