Quantum Notes on Object Oriented Programming/System Design will help you succeed in Aktu Btech. For excellent exam success, gain access to critical insights and commonly asked questions. Improve your academic performance right now! Unit-1 Introduction
Dudes 🤔.. You want more useful details regarding this subject. Please keep in mind this as well. Important Questions For Object Oriented Programming/System Design: *Aktu Quantum *B.tech-Syllabus *Circulars *B.tech AKTU RESULT * Btech 3rd Year * Aktu Solved Question Paper
Q1. Explain object-oriented approach with its benefits.
Ans.
- 1. In the object-oriented approach, the focus is on capturing the structure and behavior of information systems into small modules that combines both data and process.
- 2. The main aim of Object Oriented Design (OOD) is to improve the quality and productivity of system analysis and design by making it more usable.
- 3. In analysis phase, OO models are used to fill the gap between problem and solution.
- 4 It performs well in situation where systems are undergoing continuous design, adaption, and maintenance.
- 5. It identifies the objects in problem domain, classifying them in terms of data and behavior
- 6. Following are the benefits of object-oriented approach:
- a. It facilitates changes in the system at low cost.
- b. It promotes the reuse of components.
- c. It simplifies the problem of integrating components to configure large system.
- d. It simplifies the design of distributed systems.
Q2. Explain the major features of Object-Oriented Programming.
Ans. Features of object-oriented language are:
1. Encapsulation :
- i. Encapsulation means that data are encapsulated inside an inviolable shell along with the methods required to use it.
- ii. The only way to reach the data is through these particular methods (see Fig. 1.3.1).
- iii. It is the mechanism that binds together code and the data it manipulates.
- iv. This concept is also used to hide the internal representation, or state, of an object from the outside.
2. Polymorphism:
- i. Polymorphism means having many forms.
- ii. Polymorphism is the ability of a message to be displayed in more than one form.
- iii. lt plays an important role in allowing objects having different internal structure to share the same external interface.
3. Inheritance:
- i. Inheritance is the ability to create classes that share the attributes and methods of existing classes, but with more specific features.
- ii. Inheritance is mainly used for code reusability.
Q3. What do you mean by object-oriented techniques ? Explain with some examples.
Ans.
- 1. Object-Oriented Technology (OOT) is an approach to program organization and development that attempts to reduce some of the issues with conventional programming techniques.
- 2. It is a new way of organizing and developing programs and has nothing to do with any particular programming language.
- 3. However, not all languages are suitable to implement the object-oriented concepts or implement partial features of object-oriented concepts.
Pros of object-oriented technology are:
- 1. It allows parallel development : If we are working with programming teams, then each can work independently of one another once the modular classes have been worked out.
- 2. The Modular classes are often reusable : Once the modular classes have been created, they can often be used again in other applications or projects.
- 3. The coding is easier to maintain :
- a. With OOP, because our coding base has been centralized, it is easier to create a maintainable procedure code.
- b. That makes it easier to keep our data accessible when it becomes necessary to perform an upgrade.
- c. This process also improves the security of the programming since high levels of validation are often required.
Cons of object-oriented technology are :
- 1. It is inefficient:
- a. Object-oriented programming tends to use more CPU than alternative options.
- b. That can make it inefficient choice when there are technical limitations involved due to the size.
- 2 It is scalable:
- a. If OOP is out of control, then it can create a massive amount of bloated, unnecessary code.
- b. When that occurs, the overhead rises and that makes it difficult to keep costs down.
- 3. It causes duplication:
- a. OOP projects tend to be easier to design than implement.
- b. That is because of the modular classes that are so flexible in their application.
- c. We may be able to get new projects up and running at a greater speed, but that comes at the cost of having projects sometimes feel like they have been cloned.
Q4. Discuss the concept of encapsulation with suitable example.
Ans.
- 1. Encapsulation consists of separating the external aspects of an object, which are accessible to other objects, from the internal implementation details of the object, which are hidden from other objects
- 2. Encapsulation prevents a program from becoming so interdependent that a small change has massive ripple effects.
- 3. The implementation of an object can be changed without affecting the applications that use it.
- 4. One may want to change the implementation of an object to improve performance, fix a bug, consolidate code, or for porting.
- 5. To understand encapsulation, let us consider the object ‘Employee’.
- 6. The attributes of employees say ‘salary’ is kept hidden inside the object and may be made accessible only through the method meant for the purpose.
- 7. The method resides within the object.
For example, if get Salary() is a method of the object “Employee’ to get the salary of an employee, then the salary of an employee can be obtained by no other way but by this method.
- 8. Other objects can also send messages to the object Employee’ and get the salary of an employee by the getSalary() method.
- 9. Other objects need not be concerned with the attributes and internal structure of the object.
- 10. This is shown in Fig. The figure shows that attributes are hidden inside the object by a method.
Using message passing to encapsulate the implementation of an object: Other parts of a system only see an object’s interface it can (services perform and operation signatures). Internal details are hidden including data and can only be accessed by a message that contains a valid signature.
Q5. Define polymorphism. Is this concept only applicable to object oriented systems ? Explain.
Ans.
- 1. Polymorphism means having many forms.
- 2. Polymorphism is the ability of a message to be displayed in more than one form.
- 3. It plays an important role in allowing objects having different internal structure to share the same external interface.
- 4. An operation is a function that may be applied to or by objects in a class.
- 5. Open, close, hide, and redisplay are operations on class Window. All objects in a class share the same operations.
- 6. Each operation has a target object as an implicit argument.
- 7. The behavior of the operation depends on the class of its target.
- 8. An object “knows” its class, and hence the right implementation of the operation.
- 9. The same operation may apply to many different classes. Such an operation is polymorphic; i.e., the same operation takes on different forms in different classes.
- 10. For example, the class File may have an operation print
- 11. Different methods could be implemented to print ASCI files, print binary files, and print digitized picture files.
- 12. All these methods logically perform the same task. However, each method may be implemented by a different piece of code.
Applicability of polymorphism :
- 1. In programming languages there are two types of polymorphism ad-hoe and universal.
- 2. There are two kinds of universal polymorphism: parametric and subtyping
- 3. Ad-hoc polymorphism is a kind of polymorphism in which polymorphic functions can be applied to arguments of different types.
- 4. In universal (parametric) polymorphism, the polymorphic functions are written without mention of any specific type.
- 5. The ad-hoc polymorphism is applicable in both traditional and object oriented programming environments, whereas universal polymorphism only applies to object-oriented systems.
Q6. Write short notes on :
a. Data store
b. Actors
c. Control flow
Ans. a. Data store:
- 1. A data store is a passive object within a data flow diagram that stores data for later access.
- 2. Unlike an actor, a data store does not generate any operations on its own but merely responds to requests to store and access data.
- 3. A data store allows values to be accessed in a different order than they are generated.
- 4. A data store is drawn as a pair of parallel lines containing the name of the store
- 5. Input arrows indicate information or operations that modify the stored data; this includes adding elements, modifying values, or deleting elements.
- 6. Output arrows indicate information retrieved from the store. This includes retrieving the entire value or some component of it.
b. Actors:
- 1. An actor is an active object that drives the data flow graph by producing or consuming values.
- 2. Actors are attached to the inputs and outputs of a data flow graph.
- 3. Examples of actors include the user of a program, a thermostat, and a motor under computer control.
- 4. An actor is drawn as a rectangle to show that it is an object. Arrows between the actor and the diagram are inputs and outputs of the diagram.
c. Control low:
- 1. A data flow diagram shows all possible computation paths for values; it does not show which paths are executed and in what order.
- 2. This is done by including control flows in the data flow diagram.
- 3. A control flow is a Boolean value that affects whether a process s evaluated.
- 4. The control flow is not an input value to the process itself.
- 5. A control flow is shown by a dotted line from a process producing a Boolean value to the process being controlled.
Important Question with solutions | AKTU Quantums | Syllabus | Short Questions
Object Oriented Programming/System Design Btech Quantum PDF, Syllabus, Important Questions
Label | Link |
---|---|
Subject Syllabus | Syllabus |
Short Questions | Short-question |
Question paper – 2021-22 | 2021-22 |
Object Oriented Programming/System Design Quantum PDF | AKTU Quantum PDF:
Quantum Series | Links |
Quantum -2022-23 | 2022-23 |
AKTU Important Links | Btech Syllabus
Link Name | Links |
---|---|
Btech AKTU Circulars | Links |
Btech AKTU Syllabus | Links |
Btech AKTU Student Dashboard | Student Dashboard |
AKTU RESULT (One VIew) | Student Result |