OOP

¡Supera tus tareas y exámenes ahora con Quizwiz!

37-A .................. is a Method That Is Automatically Called When an Object Is Created. A- Constructor. B-Set Method C-Get Method D- Overriding.

A- Constructor.

36-In Object -Oriented Programming, ................... is Used to Create Relationship Among Classes. A-Inheritance. B-Constructor. C-Overloading. D-Overriding.

A-Inheritance.

38-................... are Used to Perform Operation at The Time an Object Is Created. A- Class. B-Attributes. C- Constructor. D- Overriding.

C- Constructor.

41-........................Are Two Or More Methods in Class May Have the Same Name as Long As Their Parameter Lists Are Different. A-Inheritance. B-polymorphisms. C-Overloading. D- Overriding.

C-Overloading.

1-Can the method add() be overloaded in the following ways? 1-public int add() {} 2-public float add() {}

False

13-Constructors don't have to be named with the same name of the class

False

14-Overriding occurs when two or more when two or more methods in the class have the same name but their parameter lists are different

False

21-The Inheriting class cannot override the definition of existing methods by providing its own implemtation

False

23- Constructor overloading is not possible in Java.

False

24-The modifiers public and static cannot written in either order "public static" or "static public".

False

25-Interfaces can be instantiated.

False

28-A Programming Paradigm Refer to A Specific Language.

False

29-A Specialized Object Has Not All of the Characteristics of the General Object.

False

3-Inheritance cannot extend base class functionality

False

47-Encapsulation makes code modification easier but reduces code reuse

False

5-In java can we extends more than one class

False

11-Referenece variables can be declared without being initialized

True

12-A local reference variable must reference an object before it can be used

True

15-Static methods are used to create utility classes such as math class in the java standardlibrary

True

2-Method overloading is The process of defining two or more methods within the same class that have same name but different parameters list

True

22-Method overriding is combination of inheritance and polymorphism?

True

26-Object -Oriented Programming (OOP)Is A Programming Paradigm Based On the Concept of Object.

True

27-A Programming Paradigm Is a Style of Programming, away of Thinking About Software Construction.

True

30-The Relationship Between a Suberclass and an Inherited Class Is Called an "Is A" Relationship.

True

31-We Can Extend the Capabilities of a Class.

True

4-In java can we implements more than one class

True

48-Improvements in compiler technology help make OO Programming more usable

True

19-Which concept of java is achieved by combining methods and attribute into a class a) Encapsulation b) Inheritance c) Polymorphisum d) Abstraction

a) Encapsulation

5-Which feature of OOP reduces the use of nested classes? a) Inheritance b) Binding c) Abstraction d) Encapsulation

a) Inheritance

42- which of the following is derived class: a) child class b) parent class c) base class d) super class

a) child class

10- each object is created from the class is called an ...... of the class a) instance b) variable c) method d) operation

a) instance

6-Object oriented programming is a programming paradigm based on the concept of...... a) objects b) variables c) functions d) data

a) objects

48-........ is a blueprint for ......... a)Class, object b)Object, class c)Abstract class, interface d)Interface, abstract class

a)Class, object

26-...... is an advanced programming style, in which the program is divided into units called objects a)Oop - Object oriented b)programming c)Class d)Constructor

a)Oop - Object oriented

46-Which feature of OOP is exhibited by the function overriding? a)Polymorphism b)Encapsulation c)Abstraction d)Inheritance

a)Polymorphism

45-The keyword of inheritance is ......... a)extend b)abstract c)implement d)Override

a)extend

25-what is the modifier that prevent the overriding of a superclass method? a)final b)abstract c)protected d) private

a)final

49-A class with all abstract methods is ......... a)interface b)abstract class c)package d)none of them

a)interface

14-Which of the following syntax is incorrect for the class definition? a)student class{ }; b)class student{ student(int a){} }; c)class teacher{ public: teacher(inta){ } }; d)None of the mentioned

a)student class{ };

33-Which procedure among the following should be used to implement a "is a" relationship between two entities? a) Polymorphism b) Inheritance c) Templates d) All of the mentioned

b) Inheritance

29-Static methods may.............. with instance fields, only static fields. a)Communicate b) Not communicate c)Created d)Constructor

b) Not communicate

7-A ......... is a style of programming, a way of thinking about software construction a) Algorithms b) Programming paradigm c) Design Patterns d) Data Structure

b) Programming paradigm

2-Which one of the following is not an access modifier? a) Protected b) Void c) Public d) Private

b) Void

4-Which among the following represents correct constructor? a) -classname() b) classname() c) ()classname d)~classname()

b) classname()

43-"occurs when a subclass child class has the same method as the parent class" is a definition for a) inheritance b) overriding c) association d) overloading

b) overriding

30-A.......is code that describes a particular type of object. a)Methods b)Class c)Constructor d)Static methods

b)Class

11-The combination of abstraction of the data and code is viewed in________. a)Inheritance b)Object c)Class d)Interfaces

b)Object

27-Which access specifier is usually used for data members of a class? a)Protected b)Private c)Public d)Default

b)Private

28-Data hiding helps enforce the .......of an object's a)internal b)integrity c)Methods d)Class

b)integrity

15-The object cannot be________? Not exit a)passed by copy b)passed as function c)passed by value d)passed by reference

b)passed as function

34-The operator used to access member function of a class? a) : b) :: c) . d) #

c) .

16-What is the extension of compiled java classes? a) .txt b) .js c) .class d) .java

c) .class

31- Number of constructors a class can define is? a) 1 b) 2 c) Any number d) None of the mentioned

c) Any number

20- Polymorphisum is one interface with a) Single method b) Multiple record c) Multiple method d) Single record

c) Multiple method

18-Method Overloading is done during a) Late binding b) dynamic binding c) Program Compilation d) RunTime

c) Program Compilation

3-In which access should a constructor be defined, so that object of the class can be created in any function? a) Any access specifier will work b) Private c) Public d) Protected

c) Public

9- object is a thing ...... a) tangible b) non-tangible c) both a and b d) none of above

c) both a and b

13- Which member of the superclass is never accessible to the subclass? a)Public member b)Protected member c)Private member d)All of the mentioned

c)Private member

23-superclass also can be called ...... a)child class b)derived class c)base class d)subclasse

c)base class

21- ........Have the same name as the class a)variable b) object c)constructor d) method

c)constructor

50-super classes are also called ......... a)derived class b)child class c)parent class d)specialized class

c)parent class

22-Which keyword should be used to declare static variables? a)const b)common c)static d)stat

c)static

17- What is the extension of java code files? a) .js b) .txt c) .class d) .java

d) .java

44-the default number in the constructor is a) 1 b) "0" c) "null" d) 0

d) 0

32- Correct statement about constructors? a) Constructors can be overloaded b) Constructors are never called explicitly c) Constructors have sam d) All of the mentioned

d) All of the mentioned

44-the usage of "final" is.... a) to create a constant variable b) to prevent a method from overriding c) to prevent inheritance d) all of them

d) all of them

43-which of the following is the definition of class a) parent of an object b) scope of an object c) instance of an object d) blueprint of an object

d) blueprint of an object

8-All the languages below formulate programs as a series of objects and methods that interact to perform a specific task except ....... a) smalltalk b) c++ c) java d) haskell

d) haskell

1-Which of these are selection statements in Java? a) break b) continue c) for() d) if()

d) if()

47-the method signature is composed of ......... a)parameters number b)parameters data type c)parameters order d)All of them

d)All of them

39-Which is not a feature of OOP in general definitions? a)Efficient Code b)Code reusability c) Modularity d)Duplicate/Redundant data

d)Duplicate/Redundant data

12- Which among the following is not a member of the class? a)Virtual function b)const function c)Static function d)Friend function

d)Friend function

40-Which feature of OOP indicates code reusability? a)Abstraction b)Polymorphism c)Encapsulation d)Inheritance

d)Inheritance

35-Where is the memory allocated for the objects? a)Cache b)ROM c)HDD d)RAM

d)RAM

24-subclass method have the same signature as superclass is called....... a)interface b)abstraction c)overloading d)overriding

d)overriding

10- the member can be accessed by code inside the class or outside ,when we use the private access modifier

false

18-Constructors have different name as the class

false

19-overloading method is Two or more methods in a class may have the difference name as long as their parameter lists are different

false

34-the constructor can be inherited from the superclass

false

35-inheritance is the only way to use methods and data from another class

false

37-You can make only one instance(object) from a class

false

38-A class is composed only of Operations(methods)

false

40-constructors are typically private

false

41-creating two or more methods with the same name and different signatures is called overriding

false

42-if you didn't provide a constructor to the class, an error will occur

false

43-static method can be called at both class level and object level

false

45-you can make an instance of an abstract class

false

46-a class can extend many other classes and it can implement only one interface

false

16-The combination of abstraction of the data and code is viewed in object

true

17-Constructors typically initialize instance fields and perform other object initialization tasks

true

20-Static fields and static methods do not belong to a single instance of a class

true

32-any class in java can have two or more constructors in case the parameters of each constructor are different

true

33-class can be subclass and superclass at the same time

true

36-we use JavaFX and scene builder for a Graphical user interface

true

39-Reference variables can be declared without being initialized

true

44-we use the keyword extend to inherit from a superclass

true

6-Aclass is code that describes a particular type of object

true

7-Each Object that is created from a Class is called an Instance of the class

true

8-An Access modifiers is a java key word that indicates how a field or method can be access

true

9- only the class's methods may directly access and change the object 's internal data

true


Conjuntos de estudio relacionados

Ramsey classroom post test chapter 5

View Set

MKTG 633 Sample Multiple Choice 10 Each Chapter

View Set

Chapter 4: Descriptive Data Mining

View Set

Analyze Data to Answer Questions

View Set

Chapter 67: Crisis Theory and Interventions

View Set