Programmation

782 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.

Polymorphisme

Ce document explore le concept de polymorphisme en programmation orientée objet. Il présente les notions de surclassement (upcasting), de ligature dynamique, et de conversion explicite, illustrées à travers des exemples pratiques en Java. Les explications mettent en évidence comment un objet peut être manipulé sans connaître son type spécifique, en s'appuyant sur des héritages. Enfin, il détaille le fonctionnement du chaînage dynamique, de la réaffectation des références polymorphiques et des conversions d'arguments effectifs.

polymorphisme
upcasting
ligature dynamique
1p0
Programmation orientée objet avec Java: Sous-classes, héritage et polymorphisme

This document provides a structured explanation of inheritance, subclasses, and polymorphism in Java, emphasizing core concepts such as subclass creation, extending parent classes, and overriding methods for specialization. Through UML diagrams and code examples, it introduces simple inheritance and composition, illustrating the relationships between classes like Vehicule, Voiture, and Camion. The document also delves into advanced topics like constructor chaining, masking fields, and method overriding, including the use of annotations like @Override for clarity. Key principles of Java's ty...

inheritance
Vehicule example
polymorphism
36p0
Object-Oriented Programming Java Practical Exercise

This document is a programming assignment focusing on Object-Oriented Programming concepts in Java. It guides students to implement classes representing geometric shapes (Point, Circle, and Cylinder) and explore inheritance, encapsulation, and polymorphism. The exercise asks students to calculate surface area and volume for these shapes, using mathematical formulas incorporating radius, height, and center coordinates. The provided code includes constructors, setters, and methods, emphasizing best practices and accurate functionality for geometrical operations.

OOP
Java
inheritance
4p0
T.D de Programmation Orientée Objet N° 3

The document contains three exercises focusing on the implementation of object-oriented programming concepts. Exercise 1 involves completing classes to enable proper inheritance between Point, Cercle, and Cylindre classes, calculating specific properties such as surface area. Exercise 2 explores polymorphism and method overriding using classes such as Personne, Enseignant, and its derivatives. Exercise 3 requires writing the minimal required code for a program that demonstrates class hierarchies and method behavior through inheritance and overriding in a profession-themed context. The docum...

class inheritance
surface calculation formula
object-oriented programming theory
2p0
TP JAVA N°2

The document provides a programming exercise in Java for students studying Object-Oriented Programming. The primary tasks include implementing and testing a class to process arrays and compute various operations such as sums, averages, and search functions. Additional exercises cover writing a method to identify palindromes and implementing a string manipulation class with functionalities like counting words, categorizing vowels and consonants, and extracting numeric characters. The solutions include method definitions and a main method for testing purposes.

Java
ParcoursTableau
palindrome
4p0
TP JAVA N°1 - Programmation Orientée Objet

This document outlines a practical exercise for students in the context of Object-Oriented Programming. It includes three main tasks: defining a class capable of creating and managing integer arrays, implementing a sorting mechanism for these arrays, and applying this functionality through a predefined program stub. The methodology emphasizes coding and object-oriented principles, such as encapsulation and modularity. Results are generated by creating, sorting, and displaying integer arrays using Java code.

Java
Object-Oriented Programming
array sorting
1p0
Programmer en Java

This document introduces Java programming concepts, gradually moving from basic syntax to advanced object-oriented concepts. It leverages an educational programming environment called Greenfoot for interactive learning, focusing on exercises that explore methods, classes, and scenarios to promote understanding of programming logic and structure. Additional topics include advanced interaction with objects, parameter usage, and control flow mechanisms, culminating in practical application scenarios. Transitioning away from Greenfoot, the document outlines the use of simpler environments, incl...

Java methods
Greenfoot
object-oriented programming
73p0
Developing Android Applications Using Java

This document systematically introduces the fundamental concepts of Android application development. It begins with Java programming, explaining its importance, and progresses to teaching XML utilization for designing interfaces and managing configurations. The methodology includes a detailed exploration of using tools like Eclipse and Android Studio, outlining their features and setup processes. Finally, practical implementation examples demonstrate working with activities, intents, and managing user interactions within various application components.

Android development concepts
Java
XML
263p0
POO TD: Encapsulation, Héritage et Polymorphisme

The document presents a step-by-step practical application of key object-oriented programming principles: encapsulation, inheritance, and polymorphism. In encapsulation, users implement a 'Ville' class with private attributes, public methods, and constructors ensuring valid initialization for inhabitants. In inheritance, a 'Capitale' class extends the 'Ville' class, requiring method overriding and testing of parent-child constructor behavior. The task evolves to include a 'Monde' class that manages city-related objects. Finally, polymorphism is demonstrated by creating a mixed array of citi...

Encapsulation
Héritage
Polymorphisme
2p0
Devoir Surveillé - Systèmes d’exploitation Programmation Concurrente

This document is an examination for the course on Operating Systems and Concurrent Programming. It features various questions related to process management and multithreading with an emphasis on concepts such as mutual exclusion, process lifecycle, and proper handling of concurrency issues. Students are required to provide succinct and clear answers, demonstrating their understanding of the key topics.

pthread
mutex
cond
9p0
Les tableaux en Java

This document introduces Java arrays and their functionality. It explains the use of arrays as special variables that allow storing and accessing multiple ordered values via indices. It covers one-dimensional and multidimensional arrays, detailing their declaration, initialization, and operations such as iteration and value search. The guide also discusses common errors like out-of-bounds exceptions and offers syntax examples, including newer JDK features like enhanced for-loops for easier array traversal.

arrays
java.lang.ArrayIndexOutOfBoundsException
multidimensional arrays
9p0
Eléments de correction du problème d’algorithmique du DS 2014

This document presents correction elements for an algorithmic problem from the 2014 exam. It includes a structure definition for a governorate, as well as functions to search for a governorate by name and to calculate the minimum and maximum density among them. Additionally, it defines a more complex structure for governorates that includes address details.

entier
gouv
struct
2p0
Devoir Surveillé 1er Semestre

This document presents a supervised exam for the first semester at the National School of Computer Science, focusing on algorithmic concepts and programming in C. The exam includes problems related to data structures representing Tunisian governorates and employee names. The aim is to evaluate students' understanding of data representation and manipulation techniques in programming.

quot
employe
repre
Université de la Manouba3p0
Introduction à la Programmation Orientée Objet (POO)

The document introduces the principles of Object-Oriented Programming (OOP), detailing its historical evolution from procedural and modular programming. It defines key concepts like encapsulation, abstraction, inheritance, and polymorphism, emphasizing their impact on system quality, development time, and maintenance costs. The methodology encourages modularizing, encapsulating, and modeling software systems by treating them as a society of objects interacting via defined interfaces. The findings highlight that OOP enhances code reuse, maintainability, and mimics real-world thinking in prob...

Object-Oriented Programming
Encapsulation
Inheritance
12p0
Chapitre 2 : Concepts OO en JAVA

This document provides a foundational understanding of Object-Oriented (OO) programming concepts in Java, with emphasis on the role and structure of classes, attributes, methods, and packages. It covers essential elements such as constructors, visibility modifiers, static members, and initialization mechanisms. Detailed syntax and examples are provided to model the principles, showcasing key features such as encapsulation, inheritance, and the reuse of code in Java. Exercises and practical examples illustrate how to declare and manipulate classes and their components effectively.

Java
OOP (Object-Oriented Programming)
Class and Object
Institut Supérieur des Études Technologiques28p0
Chapitre 3 : Encapsulation et Surcharge

This document delves into the principles of encapsulation and method overloading in object-oriented programming, particularly in Java. It defines encapsulation as a mechanism to bundle data and methods while controlling access through visibility modifiers (e.g., public, private). The document highlights the benefits of encapsulation, such as improved simplicity, robustness, and maintainability. Additionally, it explains method overloading as enabling the use of identically named methods with varying parameter configurations, enhancing code reusability and semantic clarity.

encapsulation
setters and getters
method overloading
7p0
Corrections des exercices du livre 'Java pour les enfants, les parents et les grand-parents'

This document serves as a comprehensive solutions manual for the exercises in 'Java pour les enfants, les parents et les grand-parents' by Laurent Bernabé. It provides detailed step-by-step corrections for each exercise across multiple chapters, covering a variety of programming topics like object-oriented programming, GUI development with Swing, and advanced features like exceptions and generics. Each chapter includes systematic coding examples, explanations of core Java concepts, and practical synthesis sections for consolidating knowledge. Additionally, challenging exercises labeled as '...

Java
classes and methods
object-oriented programming
118p0
TP JAVA N°1

This document is a Java programming lab assignment designed for SI2-B gTP2 students at Université de Carthage, specifically for Object-Oriented Programming. It includes a series of exercises focusing on Java classes, methods, and basic object-oriented paradigms. Exercises involve analyzing a given program, implementing classes with constructors and methods, such as for 'Temps' and 'Point', and performing operations like translations, distance calculations, and evaluating program outputs. The final exercise involves creating a program to calculate the area and perimeter of a square using use...

Object-Oriented Programming
Java
class methods
2p0
INITIATION À MATLAB

This document serves as an introduction to MATLAB, a powerful numerical computing software designed for matrix calculations. It explores its features, including interpreted programming and variable handling. The goal is to familiarize students with MATLAB's environment and basic commands.

matlab
peut
fonction
10p0
Pratiques de conversion RVB/HSV et traitement d’images en niveau gris avec MATLAB

This document provides an overview of digital image processing, including definitions, formats, and various techniques used to manipulate images. It discusses image representation in terms of pixels and color components, as well as methods for format changes, histogram equalization, and filtering techniques. Practical exercises in MATLAB are included to reinforce the concepts covered.

image
filtrage
filtre
3p0
Review: Caches in Memory Systems

This document provides an overview of direct-mapped caches, including the indexing mechanism and the importance of tags and valid bits for data retrieval. It also addresses the size and organization of cache and discusses factors affecting memory system performance, particularly hit time, miss penalty, and average memory access time (AMAT). Finally, it explores strategies for improving memory access times.

cache
block
address
40p0
REALISATION DE LA LIGNE DE PARTAGE DES EAUX PAR FILE D’ATTENTE HIERARCHIQUE PARALLELE

This document discusses the realization of the water dividing line through parallel hierarchical queuing. It delves into algorithmic studies and various methods of applying and utilizing the hierarchical queue for efficient processing. The work includes a detailed analysis of classical and controlled LPE along with their fundamental characteristics and parallelization techniques.

dans
processeur
pixels
60p0
Descripteur basé sur Curvature Scale Space

This document discusses a descriptor based on the Curvature Scale Space (CSS) methodology applied to contour detection in images. It elaborates on the algorithms for calculating CSS, matching descriptors, and presents results showcasing the effectiveness of the approach. Key properties include robustness to noise and efficiency in execution.

algorithme
calcul
matching
16p0
L'analyse XML

This document introduces XML as a markup language for structuring and representing data. It details the Document Object Model (DOM) as a parse tool for XML, explaining its tree structure and the APIs that allow navigation and manipulation of XML with programming languages like Java. The text provides step-by-step instructions on reading and writing XML using the DOM API in Java, including code examples for parsing and generating XML documents. Finally, it emphasizes the importance of DOM and its adaptability across different platforms and languages.

XML
DOM API
parse tool
26p0

Autres ressources en programmation