Section A : Objective Type Questions
1. An object is a/an_
An object is a/an of a class.
(a) member
(b) instance
(c) interface
(d) alternate name
2. A blueprint that represents characteristics and behaviour of a group of entities is called
(a) object
(b) abstraction
(c) class
(d) polymorphism
3. Exposing only essential features while hiding unnecessary details is
(a) data hiding
(b) encapsulation
(c) modularity
(d) abstraction
4. Shubhra is writing an OOP code for items like car, truck, bus etc. These items under the clas
are called
(a) methods
(b) items
(c) objects
(d) attributes
5. Wrapping up of characteristics and behaviour in one single unit is
(b) Abstraction
(a) Encapsulation
(c) Inheritance
(d) Polymorphism
ha cinale unit is called
Answers
Answer:
1(b)
2(c)
3(d)
4
5(a)
Explanation:
1 .
(b)
an object is an instance of a class
2.
(c)
3.
(d)
Abstraction of data is exposing only essentials and hiding unnecessary things
4 .
please give the question clearly
Object :
An object is a component of a program that knows how to perform certain actions and how to interact with other elements of the program.
Method:
A method in object-oriented programming is a procedure associated with a class. A method defines the behavior of the objects that are created from the class.
Attributes :
Attributes are data stored inside a class or instance and represent the state or quality of the class or instance.
If you consider vehicle as a class then cars, trucks and all will be subclasses.
5.
(a)
Data Encapsulation is wrapping up of characteristics and behaviour in one single unit.
Answer:
- B
- C
- D
- A
- B
Explanation:
- Whenever you run a program, it is an example of that program. In languages that create gadgets from classes, an item is an instantiation of a category. That is, an item is a member of a given magnificence with particular values in place of variables. For example, in a non-programming context, "fowl" may be a category, and your puppy fowl Polly is an item of that magnificence.
- An item is an entity having a selected identity, particular traits, and particular conduct. Magnificence is a blueprint that represents a hard and fast of gadgets that percentage not unusual place traits and behavior. Take the instance of a house. An architect can have blueprints for a house.
- Abstraction refers back to the act of representing crucial functions without such heritage info or explanations. It solves the hassle withinside the layout level. It is used for hiding undesirable facts and giving applicable facts. Abstraction helps you to consciousness of what the item does in preference to the way it does it.
- The item is the object of the magnificence. We can create the item for getting access to the homes and strategies of a category.As pointed out withinside the query the automobile is a category additionally car, truck ,bus is the objects it approach approaches it miles an item of the magnificence automobile.
- The wrapping of facts and characteristics i.e approach into the unmarried unit is known as encapsulation. It is characteristic of the item-orientated programming language. The encapsulation identity notification encapsulates the conduct of the magnificence withinside the unmarried unit
#SPJ2