Worksheets9608_Ch27_OOP
Total questions: 54
Worksheet time: 29mins
What is a class (in python)?
A user-defined prototype for an object that defines a set of attributes that characterize any object of this. The attributes are data members and methods, accessed via dot notation.
A special kind of function that is defined in a class definition.
The assignment of more than one behavior to a particular function. The operation performed varies by the types of objects or arguments involved.
the system of ordering a society in which people are divided into sets based on perceived social or economic status.
What is a data member (in python)?
A class variable or instance variable that holds data associated with a class and its objects.
a person who is part of the club DATA
A variable that is defined inside a method and belongs only to the current instance of a class.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
What does function overloading mean (in python)?
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A user-defined prototype for an object that defines a set of attributes that characterize any object of the class. The attributes are data members (class variables and instance variables) and methods, accessed via dot notation.
the function overloads and kills the computer
The assignment of more than one behavior to a particular function. The operation performed varies by the types of objects or arguments involved.
What is an instance variable (in python)?
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A variable that is defined inside a method and belongs only to the current instance of a class.
The transfer of the characteristics of a class to other classes that are derived from it.
A special kind of function that is defined in a class definition.
What does inheritance mean in python?
The transfer of the characteristics of a class to other classes that are derived from it.
A variable that is defined inside a method and belongs only to the current instance of a class
The creation of an instance of a class.
It is what you sometimes get when a relative passes away
What is an instance in python?
A special kind of function that is defined in a class definition.
The creation of an instance of a class.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
A moment in time
What is instantiation in python?
The creation of an instance of a class.
The transfer of the characteristics of a class to other classes that are derived from it.
A variable that is defined inside a method and belongs only to the current instance of a class.
A unique instance of a data structure that's defined by its class. An object comprises both data members (class variables and instance variables) and methods.
What is a method in python?
a way of doing something
a special kind of function that is defined in a class definition
the creation of an instance of a class
orderliness of thought or behavior; systematic planning or action
What is an object in python?
A unique instance of a data structure that's defined by its class. An object comprises both data members (class variables and instance variables) and methods.
A special kind of function that is defined in a class definition.
The assignment of more than one function to a particular operator.
An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.
What is operator overloading in python?
None of the answers
The operator is overloaded and explodes
A unique instance of a data structure that's defined by its class. An object comprises both data members (class variables and instance variables) and methods.
The assignment of more than one function to a particular operator.
Is python an interpreter or compiler programming language?
Compiler
Interpreter
Python is uses braces to block off code
True
False
Python uses indentation to block code into chunks
True
False
Python correct naming convention for variables is?
new_user25
NewUser25
25_new_user
25NewUser
NEWUSER25
Which defines the class Student?
class Student:
Class Student:
class Student():
def Student():
Which code defines the class Student, inherits from class Person?
class Student(Person):
Class Student extends Person:
class Student <--Person:
class Student : class Person:
Procedural programming lays stress on?
Data
Functions
Object
Class
(a) can be used as a bridge to have data flow from one function to another.
________ is wrapping of data into a single unit called class.
Abstraction
Polymorphism
Encapsulation
Inheritance
__________ refers to the act of representing essential details.
Polymorphism
Abstraction
Inheritance
Encapsulation
__________ is the process in which objects of one class can link and share some common properties from the objects of another class.
Abstraction
Inheritance
Polymorphism
Encapsulation
__________ is the process of using a function for more than one purpose. It allows the use of different internal structures of the object by keeping the same external interface.
Inheritance
Polymorphism
Abstraction
Encapsulation
Which of the following adopts top down approach?
Object Oriented Programming
Procedural Programming
An _________ is an instance or of a copy of a class.
Class
Object
Attribute
Choose the correct titles for column 1 & Column 2
Data Abstraction & Data Hiding
Data Hiding & Data Abstraction
None Of These
(a) keyword is used for allocating dynamic memory of the object
Class is known as (a) datatype.
A programming mechanism that binds together code and the data it manipulates, and that keeps both safe from outside interference and misuse.
Polymorphism
Inheritance
Encapsulation
Object-Oriented Programming
(from Greek meaning “many forms”) is the quality that allows one interface to access a general class of actions.
Polymorphism
Inheritance
Encapsulation
Object-Oriented Programming
Is the process by which one object can acquire the properties of another object.
Polymorphism
Inheritance
Encapsulation
Object-Oriented Programming
Select all the given characteristic of OOP
Data structures are designed such that they characterize the objects.
C input/output is based on library and the processes are carried out by including functions.
Programs are divided into what are known as objects.
Emphasis is on data rather than procedure
Which of the following option leads to the portability and security of Java?
Bytecode is executed by JVM
The applet makes the Java code secure and portable
Use of exception handling
Dynamic binding between objects
Java uses two stage system for program execution. They are
Compiler and instruction
Compiler and interpreter
Copy and compiler
None
We can iterate over string
True
False
Which mathematical concept is fit to text data (e.g. words in documents)
Set
Bag
List
Tuple
There are 40 students in a classroom. We would like to get all students whose name starts with "A". Which looping is suitable?
For loop
While loop
Which data type is the best to store possible outcome of tossing a dice?
Tuple
List
Dictionary
You are in the car with traffic jammed at a junction. To cross that junction according to the traffic rules, which one is NOT applicable
While loop
Conditional Statement
For loop
You want to sampling 10 from 100 patients (One-by-One). Which one does NOT necessary in your code?
For loop
While loop
Conditional Statement
Set
Patients visit hospital everyday. You want to count for the "new patients" for each day. Which one is not necessary?
Set
While loop
For loop
Set difference
