Commit 16f6650e authored by LiniEisha's avatar LiniEisha

resolving conflict issues

parent 2de6d995
ast_buffer = []
read_lines = [line.rstrip('\n') for line in open('LectureRecording.txt')]
my_save_data = open("output01.txt", "a")
for lines in read_lines:
re_make_lines = lines.split("[:;?{}]")
for items in re_make_lines:
if items.replace(" ", "") == "":
pass
else:
result = items.strip() + ".\r\n"
my_save_data.write(result)
my_save_data.close()
\ No newline at end of file
What is OOPS?
OBJECT ORIENTED PROGRAMMING (OOP) is a programming concept that works on the principles of abstraction, encapsulation, inheritance, and polymorphism. It allows users to create the objects that they want and then, create methods to handle those objects. The basic concept of OOPs is to create objects, re-use them throughout the program, and manipulate these objects to get results.
Object Oriented Programming popularly known as OOP, is used in a modern programming language like Java
Core OOPS concepts are
1) Class
The class is a group of similar entities. It is only an logical component and not the physical entity. For example, if you had a class called “Expensive Cars” it could have objects like Mercedes, BMW, Toyota, etc. Its properties(data) can be price or speed of these cars. While the methods may be performed with these cars are driving, reverse, braking etc.
2) Object
An object can be defined as an instance of a class, and there can be multiple instances of a class in a program. An Object contains both the data and the function, which operates on the data. For example - chair, bike, marker, pen, table, car, etc.
3) Inheritance
Inheritance is an OOPS concept in which one object acquires the properties and behaviours of the parent object. It’s creating a parent-child relationship between two classes. It offers robust and natural mechanism for organizing and structure of any software.
4) Polymorphism
Polymorphism refers to the ability of a variable, object or function to take on multiple forms. For example, in English, the verb run has a different meaning if you use it with a laptop, a foot race, and business. Here, we understand the meaning of run based on the other words used along with it. The same also applied to Polymorphism.
5) Abstraction
An abstraction is an act of representing essential features without including background details. It is a technique of creating a new data type that is suited for a specific application. For example, while driving a car, you do not have to be concerned with its internal working. Here you just need to concern about parts like steering wheel, Gears, accelerator, etc.
6) Encapsulation
Encapsulation is an OOP technique of wrapping the data and code. In this OOPS concept, the variables of a class are always hidden from other classes. It can only be accessed using the methods of their current class. For example - in school, a student cannot exist without a class.
7) Association
Association is a relationship between two objects. It defines the diversity between objects. In this OOP concept, all object have their separate lifecycle, and there is no owner. For example, many students can associate with one teacher while one student can also associate with multiple teachers.
8) Aggregation
In this technique, all objects have their separate lifecycle. However, there is ownership such that child object can’t belong to another parent object. For example consider class/objects department and teacher. Here, a single teacher can’t belong to multiple departments, but even if we delete the department, the teacher object will never be destroyed.
9) Composition
A composition is a specialized form of Aggregation. It is also called "death" relationship. Child objects do not have their lifecycle so when parent object deletes all child object will also delete automatically. For that, let’s take an example of House and rooms. Any house can have several rooms. One room can’t become part of two different houses. So, if you delete the house room will also be deleted.
Advantages of OOPS:
• OOP offers easy to understand and a clear modular structure for programs.
• Objects created for Object-Oriented Programs can be reused in other programs. Thus it saves significant development cost.
• Large programs are difficult to write, but if the development and designing team follow OOPS concept then they can better design with minimum flaws.
• It also enhances program modularity because every object exists independently.
Today our lecture is based an introduction to Object Oriented Programming Concepts. OBJECT ORIENTED PROGRAMMING is a programming concept that works on the principles. The main principles are abstraction, encapsulation, inheritance, and polymorphism. OOP allows users to create the objects that they want and then, create methods to handle those objects. The basic concept of OOPs is to create objects, re-use them throughout the program, and manipulate these objects to get results. Object Oriented Programming popularly known as OOP, is used in a modern programming language like Java. Students, your 1st assignment will be in next week based on core OOP Concepts. Now Let’s what are Core OOPS concepts. First one is class. The class is a group of similar entities. It is only an logical component which means it is not a physical entity. Now let’s go for example, if you had a class called “Expensive Cars” the object could be like Mercedes, BMW, Toyota, etc. and the properties an be price or speed of these cars. While the methods may be performed with these cars are driving, reverse, braking. Next core concept is object. An object can be defined as an instance of a class, and there can be multiple instances of a class in a program. An Object contains both the data and the function, which operates on the data. For example - chair, bike, marker, pen, table. Next, we have Inheritance. What is inheritance. Inheritance is an OOPS concept in which one object acquires the properties and behaviours of the parent object. It’s creating a parent-child relationship between two classes. It offers robust and natural mechanism for organizing and structure of any software. You will get a full question on inheritance and abstraction. An abstraction is an act of representing essential features without including background details. It is a technique of creating a new data type that is suited for a specific application. Now let’s see an example while driving a car, you do not have to be concerned with its internal working. Here you just need to concern about parts like steering wheel, Gears, accelerator. Ok so do you know what is Encapsulation? It is an OOP method wrapping the data and code. In this OOPS idea, the factors of a class are constantly hidden different classes. It must be gotten to utilizing the techniques for their present class. For instance - in school, an understudy can't exist without a class. Rest of the oop core concepts will be discussed in our next lecture. Before we end the lecture I will tell you some advantages of oop . OOP offers easy to understand and a clear modular structure for programs. Objects created for Object-Oriented Programs can be reused in other programs. Thus it saves significant development cost. Large programs are difficult to write, but if the development and designing team follow OOPS concept then they can better design with minimum flaws. It also enhances program modularity because every object exists independently.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment