Question:-
A. Welcome to the session.
A. “Welcome to the session”
A. ‘Welcome to the session.’
A. Error
C is correct.
Question:-
A. 3
A. 12
A. An error
A. “12”
B is correct.
OOPS:-
Object-oriented programming System(OOPs) is a
programming paradigm based on the concept of “objects” and
“classes” that contain data and methods. The primary purpose
of OOP is to increase the flexibility and maintainability of
programs. It is used to structure a software program into simple,
reusable pieces of code blueprints (called classes) which are
used to create individual instances of objects.
Question:-
Which is not a feature of OOP in general definitions?
A. Efficient Code
A. Code reusability
A. Modularity
A. Duplicate/Redundant data
D is correct.
What is an Object:-
The object is an entity that has a state and a behavior
associated with it. It may be any real-world object like the
mouse, keyboard, chair, table, pen, etc. Integers, strings,
floating-point numbers, even arrays and dictionaries, are all
objects. More specifically, any single integer or any single
string is an object. The number 12 is an object, the string
"Hello, world" is an object, a list is an object that can hold
other objects, and so on. You've been using objects all along
and may not even realize it.
What is a Class:-
A class is a blueprint that defines the variables and the
methods (Characteristics) common to all objects of a certain
kind.
Example:- If Car is a class, then Maruti 800 is an object of
the Car class. All cars share similar features like 4 wheels, 1
steering wheel, windows, breaks etc. Maruti 800 (The Car
object) has all these features.
Classes vs Objects:-
Classes are used to create user-defined data structures.
Classes define functions called methods, which identify the
behaviors and actions that an object created from the class
can perform with its data.
Defining a Class in Java:-
Constructor:-
Constructors are generally used for instantiating an object.
The task of a constructor is to initialize(assign values) to the data
members of the class when an object of the class is created.
What is public Keyboard:-
using the public keyword before a constructor in Java
allows other parts of your program to create objects of that
class using that constructor.
Instantiation an Object in Java:-
Example:-
In Java, an object is created by instantiating a class using the
new keyword followed by a call to the class's constructor. The
constructor initializes the object and sets its initial state.
Question:-
The process of creating an object from a class is called:
A. Inheritance
A. Encapsulation
A. Instantiation
A. Polymorphism
C is the correct option.
Example:-
Question:-
Which keyword is used to create an object in Java
A. object
A. instance
A. new
A. create
C is correct option.
Question:-
Which of the following best describes a class in Java?
A. A blueprint or template for creating objects
A. A type of variable used to store data
A. A method that performs a specific action
A. A keyword used to control access to class members
A is correct option.
Question:-
An object is an instance of a:
A. Method
A. Variable
A. Class
A. Package
C is the correct option.

Introduction to OOPS in Python bsics-.pptx

  • 1.
    Question:- A. Welcome tothe session. A. “Welcome to the session” A. ‘Welcome to the session.’ A. Error
  • 2.
  • 3.
    Question:- A. 3 A. 12 A.An error A. “12”
  • 4.
  • 5.
    OOPS:- Object-oriented programming System(OOPs)is a programming paradigm based on the concept of “objects” and “classes” that contain data and methods. The primary purpose of OOP is to increase the flexibility and maintainability of programs. It is used to structure a software program into simple, reusable pieces of code blueprints (called classes) which are used to create individual instances of objects.
  • 6.
    Question:- Which is nota feature of OOP in general definitions? A. Efficient Code A. Code reusability A. Modularity A. Duplicate/Redundant data
  • 7.
  • 8.
    What is anObject:- The object is an entity that has a state and a behavior associated with it. It may be any real-world object like the mouse, keyboard, chair, table, pen, etc. Integers, strings, floating-point numbers, even arrays and dictionaries, are all objects. More specifically, any single integer or any single string is an object. The number 12 is an object, the string "Hello, world" is an object, a list is an object that can hold other objects, and so on. You've been using objects all along and may not even realize it.
  • 9.
    What is aClass:- A class is a blueprint that defines the variables and the methods (Characteristics) common to all objects of a certain kind. Example:- If Car is a class, then Maruti 800 is an object of the Car class. All cars share similar features like 4 wheels, 1 steering wheel, windows, breaks etc. Maruti 800 (The Car object) has all these features.
  • 10.
    Classes vs Objects:- Classesare used to create user-defined data structures. Classes define functions called methods, which identify the behaviors and actions that an object created from the class can perform with its data.
  • 11.
  • 12.
    Constructor:- Constructors are generallyused for instantiating an object. The task of a constructor is to initialize(assign values) to the data members of the class when an object of the class is created.
  • 13.
    What is publicKeyboard:- using the public keyword before a constructor in Java allows other parts of your program to create objects of that class using that constructor.
  • 14.
    Instantiation an Objectin Java:- Example:- In Java, an object is created by instantiating a class using the new keyword followed by a call to the class's constructor. The constructor initializes the object and sets its initial state.
  • 15.
    Question:- The process ofcreating an object from a class is called: A. Inheritance A. Encapsulation A. Instantiation A. Polymorphism
  • 16.
    C is thecorrect option.
  • 17.
  • 18.
    Question:- Which keyword isused to create an object in Java A. object A. instance A. new A. create
  • 19.
    C is correctoption.
  • 20.
    Question:- Which of thefollowing best describes a class in Java? A. A blueprint or template for creating objects A. A type of variable used to store data A. A method that performs a specific action A. A keyword used to control access to class members
  • 21.
    A is correctoption.
  • 22.
    Question:- An object isan instance of a: A. Method A. Variable A. Class A. Package
  • 23.
    C is thecorrect option.