1. Each object of a class has its own copy of the class's ________.
2. What are the four principles of object-oriented programming?
3. What parameters are required to be passed to a class constructor?Here they haven't mentioned any specific language so let's consider all languages.
4. What is the difference between an interface and an abstract class?
5. What is the difference between early binding and late binding?
6. How does dynamic typing complicate troubleshooting?
7. What does a concrete class not have?
8. Static polymorphism uses method _ ?
9. In the context of OOP, what is composition?
10. An instance of which type of class cannot be created?
11. What is the function of a finalizer or destructor?
12. Which choice is not an OOP language?
13. What is the purpose of the finally block?
14. What is the main idea behind separation of concerns?
15. Assume single inheritance is used with classes A and B while A is the base class. Then assume classes C, D, and E, where C is a base class and D is derived from C, then E is derived from D. Class C is made to inherit from class B. Which type of inheritance is reflected?
16. Methods and attributes that define an object are a kind of blueprint called what?
17. What is the scope of a class nested inside another class?
18. What is the difference between a parameter and an argument?
19. What does the value (0.5,0.5,0.5) indicate in the class diagram specification position: Coordinate = (0.5,0.5,0.5)?
20. Which statements best describe the Gang of Four design patterns called Memento and Observer?
21. What is the best example of a superclass and subclass relationship?
22. Are you required to return an object if it was passed by reference to a function, and why or why not?
23. Which choice is a benefit of using dependency injection?
24. Which type of function can be used for polymorphism?
25. _ describes an aggregation
26. You have modules that are dependent on each other. If you change one module, you have to make changes in the dependent modules. What term is used to describe this problem, and what is a potential solution?
27. There are five classes. Class E is derived from class D, D from C, C from B, and B from A. Which class constructor(s) will be called first if the object of E or D is created?
28. What defines the catch block most accurately?
29. What is a copy constructor?
30. Why would you override a method of a base class?
31. The open/closed principle states that classes should be open for _ but closed for _.
32. How do object behaviour and attributes differ?
33. What is the function of a user diagram?
34. Why is unit testing harder in OOP than functional programming?
35. What is a reference to an object?
36. Which of these keywords are access specifiers?
37. What is the relationship between abstraction and encapsulation?
38. What type of inheritance may lead to the diamond problem?
39. Can abstract classes be used in multilevel inheritance?
40. What best describes what object-oriented programming does?
41. Which words in the following list are candidates for objects: trumpet, clean, enrage, leaf, tree, collapse, active, and lively?
42. Which type of function among the following shows polymorphism?
43. In addition to attributes and behaviours, what quality must a class possess?
44. Why is inheritance used when creating a new class?
45. Which is false for a member function of a class?
46. What is the result of using more abstraction?
47. Which statement about compositions and aggregations is true?
48. How are contents of a composition different from those of aggregation?
49. What are CRC Cards?
50. What is the purpose of static constructor?
51. When and how often is a static constructor called?
52. Why is code duplication so insidious?
53. Which is NOT one of the basic types of inheritance?
54. Which class has the highest degree of abstraction in a multilevel inheritance relationship of five levels?
55. A mobile phone is made up of components such as a motherboard, camera, and sensors. The motherboard represents all the functions of a phone, the display shows the display only, and the phone is represented as a whole. Which of the following has the highest level of abstraction?
56. What is a method?
57. If an object is passed by reference, the changes made in the function are reflected _.
58. In multilevel inheritance, one class inherits how many classes?
59. What are the five Creational Design patterns by the Gang of Four ?
60. Two classes combine private data members and provide public member functions to access and manipulate those data members. Where is abstraction used?
61. A language that does not support polymorphism but supports classes is considered what?
62. Which type of inheritance must be used so that the resultant is hybrid?
63. How are user stories different from use cases?
64. In context of OOP, what is association?
65. Which of the following is NOT an advantage of using getters and setters?
66. Which statement is true?
67. Which type of inheritance ,when done continuously, is similar to a tree structure?
68. Which statement best describes the method of inheritance in OOP?
69. Why would you implement composition using an id instead of a reference?
70. Which two blocks are used to handle and check errors?
71. F a local class is defined in a function, what is true for an object of that class?
72. When is a constructor executed?
73. Which type of constructor cannot have a return type?
74. Which code creates a new object from the Employee class?
75. Ou want a method with behavior similar to a virtual method--it is meant to be overridden --expect that it does not have a method body. It just has a method signature. What kind of method should you use?
76. What is an IS-A relationship?
77. What is encapsulation?
78. What is the best reason to use a design pattern?
79. When does static binding happen?
80. Why would you create an abstract class, if it can have no real instances?
81. For which case would the use of a static attribute be appropriate?
82. What is an example of dynamic binding?
83. A(n) ____ is a variable that is used within a function.
84. A class and its members can be described graphically using a notation known as the ____ notation.
85. In a sequence diagram, the _____ indicates when an object sends or receives a message.
86. In oop, you declare a class that extends another class. this is called ________.
87. A ____ method is also known as a help method.
88. Class ________ represents an image that can be displayed on a jlabel.
89. By convention, a class diagram contains the ____ following each attribute or method.
90. ________ members of a base class are never accessible to a derived class.
91. Protected members of a base class are like ________, but they may be accessed by derived classes.
92. The ________ class constructor is called before the ________ class constructor.
93. When an object of one class is a data field within another class, they are related by ____.
94. Multiple inheritance is when a ________ class has ________ base classes.
95. The class used as a basis for inheritance is the ____ class.
96. The ________ is used to protect important data.
97. Objects are created from abstract data types that encapsulate ________ and ________ together.
98. Every event object has the _____ method that returns the object that triggered the event.
99. A class is a(n) _____________ that is defined by the programmer.
100. Members of the class can be declared with auto, extern or register storage classes.
OS (Operating System)
Oracle
Programming Languages
Security
Port Numbers
SAP HANA XSJS
Related MCQ's