course update of 2023-11-30 09:36:57
This commit is contained in:
parent
9409d1dad5
commit
725ca8d4ce
14
.obsidian/workspace.json
vendored
14
.obsidian/workspace.json
vendored
@ -13,7 +13,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/B2/Exercises/String exercise.md",
|
"file": "Prog/OOP.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/B2/Exercises/String exercise.md",
|
"file": "Prog/OOP.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -102,7 +102,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outgoing-link",
|
"type": "outgoing-link",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/B2/Exercises/String exercise.md",
|
"file": "Prog/OOP.md",
|
||||||
"linksCollapsed": false,
|
"linksCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/B2/Exercises/String exercise.md"
|
"file": "Prog/OOP.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -158,8 +158,10 @@
|
|||||||
},
|
},
|
||||||
"active": "41ec48cdc3af71a1",
|
"active": "41ec48cdc3af71a1",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Algo/B2/Exercises/Repetitive tutorial.md",
|
"Prog/Loops.md",
|
||||||
|
"Prog/OOP.md",
|
||||||
"Algo/B2/Exercises/String exercise.md",
|
"Algo/B2/Exercises/String exercise.md",
|
||||||
|
"Algo/B2/Exercises/Repetitive tutorial.md",
|
||||||
"Algo/B2/Exercises/Imperative exercise.md",
|
"Algo/B2/Exercises/Imperative exercise.md",
|
||||||
"Prog/Collections.md",
|
"Prog/Collections.md",
|
||||||
"Prog/Array.md",
|
"Prog/Array.md",
|
||||||
@ -177,7 +179,6 @@
|
|||||||
"Algo/B1/CM/CM du 27 septembre.md",
|
"Algo/B1/CM/CM du 27 septembre.md",
|
||||||
"Algo/B1/Séminaire/Chapter 3 - Case analysis.md",
|
"Algo/B1/Séminaire/Chapter 3 - Case analysis.md",
|
||||||
"Algo/B1/Séminaire/Chapter 2 - Functions.md",
|
"Algo/B1/Séminaire/Chapter 2 - Functions.md",
|
||||||
"Prog/Loops.md",
|
|
||||||
"Algo/B1/Séminaire/Chapter 4 - A bit of imperative.md",
|
"Algo/B1/Séminaire/Chapter 4 - A bit of imperative.md",
|
||||||
"Algo/B1/CM/Lists.md",
|
"Algo/B1/CM/Lists.md",
|
||||||
"Algo/B1/Séminaire/Exercices seminaire.md",
|
"Algo/B1/Séminaire/Exercices seminaire.md",
|
||||||
@ -189,7 +190,6 @@
|
|||||||
"Algo/B1/Courses",
|
"Algo/B1/Courses",
|
||||||
"COM-ADMR/Séjour international EPITA.md",
|
"COM-ADMR/Séjour international EPITA.md",
|
||||||
"Algo/B1/CM",
|
"Algo/B1/CM",
|
||||||
"Electronic/Lecture 1.md",
|
|
||||||
"Electronic",
|
"Electronic",
|
||||||
"Architecture",
|
"Architecture",
|
||||||
"English",
|
"English",
|
||||||
|
66
Prog/OOP.md
Normal file
66
Prog/OOP.md
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# Object Oriented Programming
|
||||||
|
|
||||||
|
<img src="https://i.imgur.com/qPsUYyd.jpg" alt="meme" style="zoom:50%;" />
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
- A programming paradigm
|
||||||
|
- Allows:
|
||||||
|
- Model objects
|
||||||
|
- Make objects interact with each other
|
||||||
|
- Objcts refer to complex variables
|
||||||
|
|
||||||
|
## Benefits and motivation
|
||||||
|
|
||||||
|
- Modularity
|
||||||
|
- Abstraction
|
||||||
|
- Productivity and reusability
|
||||||
|
- Security and encapsulation
|
||||||
|
|
||||||
|
## Concrete example
|
||||||
|
|
||||||
|
- When we develop a game with cars inside
|
||||||
|
- We develop the car one time and all other games can re-use the base of the car that we created
|
||||||
|
- We have access to characteristics
|
||||||
|
- Model
|
||||||
|
- Color
|
||||||
|
- Fuel type
|
||||||
|
- ...
|
||||||
|
- We also have the behavior of the car
|
||||||
|
- Start
|
||||||
|
- Accelerate
|
||||||
|
- Stop
|
||||||
|
|
||||||
|
## Object
|
||||||
|
|
||||||
|
- Data part: object characteristcs
|
||||||
|
- Attributes
|
||||||
|
- Properties
|
||||||
|
- Fields
|
||||||
|
- ...
|
||||||
|
- Code part = oject behavior
|
||||||
|
- Methods
|
||||||
|
- Procedure
|
||||||
|
|
||||||
|
## Class
|
||||||
|
|
||||||
|
- Object = classs instance
|
||||||
|
- Class
|
||||||
|
- New data type
|
||||||
|
- Collection of objects
|
||||||
|
- Figuratively
|
||||||
|
- Class = mold
|
||||||
|
- Object = cake
|
||||||
|
- Class at compilation VS object at runtime
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
public class MyFirstClass {
|
||||||
|
public MyFirstClass() {} //constructor
|
||||||
|
}
|
||||||
|
MyFirstClass c = new MyFirstClass(); //new object
|
||||||
|
```
|
||||||
|
|
||||||
|
## Modelization
|
||||||
|
|
||||||
|
- First mandatory step
|
||||||
|
-
|
Loading…
x
Reference in New Issue
Block a user