CS questions C++/Java Which language does not support an encapsulation construct
ID: 3566984 • Letter: C
Question
CS questions C++/Java
Which language does not support an encapsulation construct for a single data type and its operations? a. C++ b. C# c. Java d. Ada95 For the C++ class MyClass , the class destructor prototype is: a. end(); b. terminator(); c. ~MyClass(); d. dtor(); _____ Which of the following access modifiers are defined In C# but not in C++? a. private b. protected c. public d. internal Which of the following languages does not support nested subprograms? a. Ada b. Java c. Python d. Ruby In Java, the import statement allows references to names In a package. a. True b. False C and C++ use header files for interfaces to library files. a. True b. False 7) _____ Which of the following is not a design issue for object-oriented languages? a. Are methods required to return only objects? b. Objects exclusivity c. Single vs. multiple inheritance d. Are subclasses subtypes (e.g., derived classes)? C++ supports OOP and procedure-oriented programming. a. True b. False Multiple inheritance means a subclass has more than one parent class. a. True b. False A Java interface is an alternative to multiple inheritance. a. True b. FalseExplanation / Answer
1. d
2. c
3. d
4. b
5. a
6. a
7. c
8. a
9. a
10. b