Object-oriented programming in Python
- Lecturer: Louis Annabi Occelli (annabi@isir.upmc.fr)
- Course code: UM4RBT10-Python
- Student workload: 8 h of lectures, 6 h of tutorials, 14 h of labs
- Credits: 3 ECTS
- Specialization tracks: ROBOT SI MeDH
- Semester offered: S1 S2 S3 S4
- Language of instruction: French English
- Targeted audience: Eng. Sc. department Other :
- Localization : PMC Campus Other :
Course Overview
This course aims to train students in object-oriented programming, based on the Python language. After reminders on Python syntax, the teaching focuses on the presentation and practice of OOP concepts (classes, objects, encapsulation, relationships, inheritance, abstraction).
Mots-clés : Object-oriented programming, Python, classes, objects, encapsulation, relationships, inheritance, abstraction
Prerequisites
Students should have previously acquired the following prerequisites to follow this course:
- Write a program using variables, operators, control structures (if/else) and loops (for/while)
- Write a program that defines and manipulates lists and functions
- Call a function in an existing package from provided documentation
- Prepare a working environment for programming (interpreter, IDE, launch a script)
Intended Learning Outcomes
By the end of this course, students will be able to:
- Test your functions and classes with different test scenarios described and performed in a notebook
- Use a virtual environment and version control software (git)
- Document a function or class using docstrings
- Find and use the right function or class for your needs within a package
- Moving from a statement that shows classes and attributes to a UML class diagram
- Moving from a simple UML diagram (a single class) to the corresponding program, and vice versa
- Moving from a complex UML diagram (several classes, relationships, inheritance, abstraction) to the corresponding program, and vice versa
- Moving from a "non-object" code to an "object" code by grouping data and processing
Indicative Teaching Sequence and Methods
| Week | C/TD/TP* | Content | Preparation | Learn.\ outc. |
|---|---|---|---|---|
| S3 | C1/TD1/TP1 | Classes and objects | AAV4, AAV5, AAV6, AAV8 | |
| S4 | C2/TP2 | Development environment (git, venv) Testing and documentation | AAV1, AAV2, AAV3 | |
| S5 | TP3 ER | Graded practical assignment covering Course C1 and Python fundamentals | AAV3, AAV5, AAV6, AAV8 | |
| S6 | C3/TD2/TP4 | Encapsulation and magic methods | AAV5, AAV6, AAV8 | |
| S7 | C4/TD3/TP5 | Class relationships Inheritance and abstraction | AAV3, AAV4, AAV5, AAV6, AAV7, AAV8 | |
| S8 | TP6 | Project launch | AAV1, AAV2, AAV3, AAV4, AAV5, AAV6, AAV7, AAV8 | |
| S13 | TP6 | Project defense practical session | AAV1, AAV2, AAV3, AAV4, AAV5, AAV6, AAV7, AAV8 |
- C/TD/TP respectively corresponds to lectures, tutorials and lab sessions.
Sequence of the unit
The course unit consists of two successive sequences:
-
Sequence 1: implementation of best practices (environment, testing, documentation) and OOP fundamentals
-
Sequence 2: more advanced OOP concepts (encapsulation, relationships, inheritance, and abstraction)
Indicative Assessment of Intended Learning Outcomes (1st session)
| Week | Individ./group | In-person/remote | Type of exam | Evaluated outcomes | Scale % |
|---|---|---|---|---|---|
| S5 | Individual | In-person | Practical | 3, 5, 6, 8 | 20% |
| S13 | Individual | In-person | Other | 1, 2, 3, 4, 5, 6, 7, 8 | 40% |
| S15 | Individual | In-person | Written | 5, 6, 7, 8 | 40% |
2nde session
| Session | Individ./group | In-person/remote | Type of exam | Evaluated outcomes | Scale % |
|---|---|---|---|---|---|
| 2 | Individual | In-person | Written | 5, 6, 7, 8 | 40% |
| 1 | Individual | In-person | Practical | 3, 5, 6, 8 | 20% |
| 1 | Individual | In-person | Other | 1, 2, 3, 4, 5, 6, 7, 8 | 40% |

