Programmation

670 documents à télécharger gratuitement

Cours, examens, TD, TP et exercices de programmation. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.

Correspondance entre le UML et le C++ : Exemples de codage

This document explores the translation of UML models into C++ code through a series of tabular examples, demonstrating object-oriented programming principles. It details the implementation of class constructors, destructors, and operators for collections and describes the application of associations, aggregations, and compositions using pointers. It highlights design choices, including single file versus multi-file declarations for classes, and delves into different relation types such as 1-to-1, N-to-1, and N-to-N, along with key inheritance strategies. The focus is on adherence to UML str...

UML
C++
object-oriented programming
10p0
Analyse et conception orientées objet: Chapitre 2 - Diagrammes d’analyse

This document explores object-oriented analysis and design, delving into behavioral diagrams such as sequence and state-transition diagrams. The sequence diagrams emphasize system dynamics by modeling message exchanges between actors and systems, often viewed as a black box. State-transition diagrams, on the other hand, focus on representing the states and transitions within a system's components. The document also includes specific examples and UML operators for modeling scenarios, enabling structured software design. Key methodological insights include transitioning from conceptual to log...

object-oriented analysis
sequence diagrams
state-transition diagrams
23p0
Exam on Object-Oriented Programming

This document outlines an examination for a course on Object-Oriented Programming. Students are required to develop a small application for personnel management using Java, focusing on class design and method implementation. Key topics include class declarations, constructors, method overloading, and interface usage.

conge
donner
classe
3p0
Leçon 1: Les variables et les types standards de données

This document introduces constants and variables in programming, detailing their characteristics such as identifiers, types, values, and uses. It emphasizes how constants remain unchanged, improving program readability, while variables can take different values throughout execution. Specific examples in Pascal are presented, including syntax for declaring constants and variables. The document also highlights Pascal's case insensitivity in identifiers and rules for naming conventions in the language.

constants
variables
Pascal
1p0
Chapitre 3: Les structures de contrôle conditionnelles

This document provides an in-depth explanation of conditional control structures in programming. It covers three main types: simple, alternative, and generalized forms, detailing their definitions, syntax, and execution flow in algorithmic terms, primarily using Pascal. Simple structures execute a single block based on a condition, alternative structures offer either-or flows based on two states, and generalized structures manage multiple conditions with non-overlapping treatments. It also introduces the choice structure, which uses a scalar selector to determine execution among multiple op...

Conditional control structure
Pascal
Algorithm analysis
1p0
Les types numériques dans le langage Pascal

This document is an educational overview of data types, operators, and their usage in Pascal programming language. It categorizes numeric data types such as INTEGER, LONGINT, BYTE, and THROW under their respective domains and size limits (e.g., INTEGER: -32768 to 32767 for 16 bits). Real data types, including Boolean, Char, and Strings, are also explained with their respective definitions, logical operators, and examples. Pascal-specific examples and syntax are demonstrated for data type declarations and operations. Users are introduced to ASCII standards for character encoding and given ex...

data types
Pascal
logical operators
1p0
Chapitre 2: Les actions élémentaires simples

The document provides an introduction to basic programming concepts, focusing on assignments, input/output operations, and result formatting, primarily using pseudocode and Pascal syntax. It covers definitions, algorithms, and examples for variable assignments, reading and writing data, and formatting outputs, including integers, real numbers, strings, and characters. The material explains essential rules such as data type compatibility and presents practical examples to improve comprehension. The examples emphasize fundamental practices in coding, aiming at building a strong foundation for...

assignment statement
Variable := value
algorithm
1p0
Algorithmique et Programmation: Les Structures de Données et Fonctions Standards

This document outlines core methodologies and functionality in Pascal, including predefined arithmetic and character functions as well as string manipulation. It provides detailed descriptions of functions like TRUNC, ROUND, ABS, and RANDOM, alongside their respective roles and practical examples. Character-based functions such as ORD, CHR, SUCC, PRED, and UPCASE are also explored to highlight ASCII manipulation. Additionally, string-handling functionalities like CONCAT, COPY, LENGTH, and DELETE are documented, providing a foundational guide for Pascal coding practice.

Pascal
TRUNC
ORD function
1p0
Chapitre 2: Les actions élémentaires simples

This lesson introduces fundamental programming concepts such as assignment, input/output operations, and formatting. It explains how to assign values to variables through constants, other variables, or expressions, and details the syntax differences between pseudocode and Pascal. It covers data input/output operations, including their definitions, syntax, and examples in algorithms and Pascal. Additionally, it explains techniques for formatting and displaying data, including integers, floating-point numbers, text strings, and characters.

assignment
syntax
Pascal
1p0
Systèmes d'Exploitation I - TP1 : Noyau et modules

Ce document traite des fonctions fondamentales du noyau d'un système d'exploitation, y compris la gestion de la mémoire et des processus. Il explique également les commandes pour gérer les modules du noyau, comme lsmod et modprobe. Enfin, il guide sur la création d'un module hello world pour le noyau Linux.

noyau
make
ommande
2p0
Systèmes d'exploitation I - 1

Ce document contient des travaux pratiques sur la gestion des processus en programmation. Il présente plusieurs codes C illustrant la création de processus et pose des questions sur les concepts de processus zombies et orphelins. L'objectif est d'explorer les structures et comportements des processus dans un système d'exploitation.

essus
code
orphelin
4p0
TP Matlab n°2: Boucle FOR-END et Fonctions

This document introduces key MATLAB programming concepts such as the FOR-END loop and functions. FOR-END loops are used for repetitive iterations with set boundaries, including support for variable step sizes and reverse counting. Functions in MATLAB are modular blocks of code with input parameters, output variables, and local variable management, enhancing reusability and maintainability of code. Emphasis is placed on syntax, indentation, and practical applications through exercises covering numerical iterations, sequence calculations, and solving mathematical equations programmatically.

FOR-END loop
MATLAB syntax
function definition
3p0
Chapitre 1 : Introduction à la POO

The document introduces the concept of Object-Oriented Programming (OOP), emphasizing its evolution from procedural programming paradigms to more modular and reusable code structures. Key elements of OOP such as encapsulation, abstraction, inheritance, and polymorphism are discussed, highlighting their significance in improving code quality, maintenance efficiency, and development speed. It outlines the benefits of modularization, such as reusability, localized modifications, and better organization of data and methods within objects. The text also contrasts OOP with earlier programming par...

Object-Oriented Programming
encapsulation
inheritance
16p0
Systèmes d’Exploitation I - Travaux Pratiques 0

This document discusses the software 'make' used for automatic file compilation in programming, specifically within UNIX platforms. It outlines the basic structure and use of 'makefile' files, demonstrating how dependencies and commands are evaluated during the build process. Examples of C source files and corresponding makefile configurations are provided.

hello
main
make
16p0
Resolving Inheritance Problems in Object-Oriented Design for SuperCanard

The document discusses a problematic use of inheritance in the SuperCanard simulation game, highlighting how adding new features caused unintended side effects. Joel, the programmer, realized that inheritance was not optimal for addressing frequent changes to behavior, such as flying and quacking. To solve this, he proposed separating behaviors into distinct classes to decouple them from the main Duck class. This design pattern enables more modular and maintainable code, allowing selective assignment of behaviors to duck types.

inheritance
interface
design pattern
10p0
Algorithmique et Travaux Dirigés

This document provides a comprehensive overview of algorithmic methods used in various mathematical contexts. It covers topics like naive algorithms, binary methods, dynamic programming, and greedy algorithms, along with exercises for practice. The course includes bibliographic references for further reading.

quot
null
filsg
159p0
Quelques problèmes NP-complets

Ce document traite de la NP-complétude en se concentrant sur des problèmes célèbres tels que 3-SAT et NAESAT. Il présente la définition de chaque problème ainsi que des preuves de leur NP-complétude par des réductions à partir de SAT. L'objectif est de montrer la diversité des problèmes NP-complets et les techniques utilisées pour les démontrer.

voir
graphe
probl
17p0
2BPmicro Programmation Fraisage CN - Exercice N°4

This document provides detailed instructions for a CNC milling exercise, focusing on contouring, spotting, and drilling tasks. It outlines the tools used, including a T1 end mill and T2/T3 drill bits, along with precise cutting conditions like spindle speed (N) and feed rate (Vf). Key points and tool corrections are specified for each step, with precise coordinates and G-code commands for execution. The document concludes with a program for CNC contournage, spotting, and drilling, ensuring accuracy and adherence to prescribed conditions.

CNC programming
cutting conditions
contouring
2p0
Programmation Fraisage CN Exercice N°3

This document is an instructional exercise focused on CNC milling programming that involves contouring with and without radius correction, using a 5mm diameter cutting tool. Methodologies include decoding program instructions, completing coordinate tables, and visualizing milling paths. The document describes step-by-step machine tool movements, including tool mounting, rapid positioning, and precise milling operations. Key findings emphasize accuracy in dimensional placements and the use of G41 for radius correction to improve precision in machining paths.

CNC programming
G41 radius correction
tool path visualization
3p0
Exploration of Enterprise Java Beans (EJB)

This document discusses Enterprise Java Beans (EJB), a technology designed to simplify the development of large-scale, distributed, and transactional Java applications. It explores the benefits of EJB, which include modularity, scalability, and session management. Detailed discussions and schema aim to explain the various types of EJBs, particularly Session Beans, and their practical applications. The document also includes an example application of EJB concepts such as stateful session management within e-commerce systems.

Enterprise Java Beans
EJB
stateful session
1p0
Projet Programmation Web

The document outlines the guidelines for a web development project to be completed by pairs of students. The project involves creating a multi-page web application with specific themes, integrating elements such as images, text, forms, and tables, and using a database with at least two tables for data management. Grading will be based on HTML/CSS design, PHP/SQL database structure, and JavaScript code quality. The submission date will be announced two weeks before the end of the course.

web application
PHP/SQL
HTML/CSS
1p0
Présentation sur les Entreprise JavaBeans (EJB)

This document is a comprehensive presentation explaining the Enterprise JavaBeans (EJB) framework. It begins by defining EJB as a server-side component model for building business applications and transitions, detailing its types: entity beans, session beans, and message-driven beans. Key classes, interfaces, and deployment descriptors like ejb-jar.xml are outlined along with the structure and functionalities of EJB servers. Finally, the presentation discusses JBoss, a J2EE application server supporting EJB, along with its components for security, transaction handling, and more.

Enterprise JavaBeans
ejb-jar.xml
Component Transaction Monitors
19p0
Les Composants EJB

This document explores Enterprise JavaBeans (EJB) as components used in distributed applications, allowing developers to focus on business logic while abstracting low-level technical issues. It describes the three-tier architecture where EJBs handle business processes and outlines three types of EJBs—entity beans for persistent data, session beans for managing tasks, and message-driven beans for asynchronous communication. Technical considerations such as interfaces, state management, and threading constraints of EJB sessions are covered, highlighting the operational differences between sta...

Enterprise JavaBeans (EJB)
three-tier architecture
stateful EJB
10p0
Chapitre 12 : Quelques problèmes NP-complets

Ce chapitre introduit des problèmes classifiés comme NP-complets, notamment 3-SAT, NAESAT, STABLE, CLIQUE, COUPURE MAXIMALE, et CIRCUIT HAMILTONIEN. Les démonstrations se basent sur des réductions polynomiales à partir de SAT ou d'autres problèmes connus. Les cadres formels comprennent les définitions des problèmes, des transformations en temps polynomial, et des chaînes d'équivalence entre satisfiabilité, cliques, couvertures de sommets et circuits hamiltoniens, offrant une vue unifiée pour prouver la NP-complétude. Une attention particulière est dédiée à la construction de graphes et à la...

NP-complet
3-SAT
NAESAT
17p0

Autres ressources en programmation