Exercices - Programmation
95 documents à télécharger gratuitement
Exercices de programmation partagés par des étudiants et des enseignants. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.
This document provides a series of exercises to implement Java programs showcasing inheritance and polymorphism concepts. Key tasks include creating classes for geometric shapes like points, rectangles, circles, and cylinders, along with methods to compute dimensions, display graphical forms, and override the 'toString' method for detailed object representation. Additionally, the exercises emphasize the testing of polymorphism principles through systematic class hierarchy usage and object manipulation.
This document presents the course content for an Object-Oriented Programming class. It includes various exercises focusing on Java programming, such as handling variables, arrays, and string manipulation. Each exercise aims to develop fundamental programming skills in Java.
This document explores Java's generic programming capabilities and their application in collections. It introduces key concepts like generic types and interfaces, showcasing their importance through hands-on exercises such as implementing stacks (using both arrays and linked lists), creating complex tasks with hierarchical structures, and managing contact directories via HashMaps. The methodology focuses on transforming existing code into generic implementations, using Java's core collection frameworks to emphasize the extensibility and type safety of generics. The findings highlight practi...
The document introduces the concept of genericity in Java and demonstrates its application using collections such as LinkedList and ArrayList. It provides step-by-step exercises to implement generic stacks, using interfaces and extending key Java classes like Collection and LinkedList, for better type-safety and reusability. The exercises also cover implementing generic tasks and building a phonebook using HashMaps, emphasizing the importance of data structures with type parameters. Each task highlights practical code examples and challenges to learn about Java's generics and collections API.
This document provides a detailed exploration of Java programming concepts using practical exercises, focusing on exceptions handling and abstract classes. Methodology includes coding tasks like using parseInt for arithmetic operations on command-line arguments, creating custom exceptions for class hierarchies, and employing constructors to validate input through exception propagation. Additionally, the functionality of interfaces versus abstract classes is analyzed, highlighting the benefits of abstract classes in organizing sorted collections such as arrays of objects. The findings unders...
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.
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...
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...
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 '...
This document presents exercises related to non-classical logics, focusing on Büchi automata and computational logic. It includes tasks to design finite automata, semantic definitions, and proofs of logical equivalences. Additionally, it features a modeling scenario of train signals using automata and CTL properties.
This document provides a series of practical programming exercises in Java, focusing on object-oriented principles such as classes, objects, inheritance, and encapsulation. The first set of exercises ('Carnet d’adresses') focuses on implementing a contact book using custom Java classes. Complementary exercises delve into geometric representations ('Point' and 'Cercle'), relational modeling for a library and books ('Book' and 'Library'), and client-account banking systems ('Client' and 'Compte'). Methodologies emphasize constructing classes with appropriate methods, attributes, and functiona...
This document provides an application exercise utilizing Java Remote Method Invocation (RMI) to create remote accessible services for string manipulation and mathematical operations. It includes instructions to define interfaces, handle remote exceptions, and implement remote objects. Sample code and structure for interfaces and classes are presented.
This document contains a series of exercises related to web services, focusing on WSDL and SOAP concepts. It includes questions regarding WSDL tags, Java method correspondences, and syntax errors in SOAP envelopes. Additionally, it provides an annex with a WSDL definition and types.
This document contains an exam for the course 'Systèmes et Applications Répartis' covering topics such as RPC, RMI, and JMS. It includes various exercises designed to test students' understanding of distributed systems and remote method invocation. The exam requires concise and precise answers to technical questions.
This document outlines an examination on distributed systems and applications, covering various topics including Java-RMI and CORBA. The exam consists of multiple exercises, each focusing on different aspects of distributed computing, such as messaging, geometric services, syntax rules, and file systems. Students are required to answer brief but clear questions demonstrating their knowledge and understanding of the subject matter.
This document includes exercises on inter-process synchronization and the classic readers/writers problem. A solution for the dining philosophers problem is also provided using mutex and conditional variables. The exercises require implementing process execution orders using semaphores and filling out Gantt diagrams.
This document describes a lab exercise on multithreaded programming with synchronization techniques. It includes two main exercises: modeling a teacher-student interaction in a computer lab and managing a fictitious bank account with deposits and withdrawals by synchronized threads. The goal is to complete the student thread implementation and ensure proper synchronization in a banking simulation.
This document contains a series of exercises focused on recursion and iterative programming techniques. Each exercise provides a task to implement various functions, including list manipulations, factorization, and set operations. Additionally, the document includes solutions for each exercise that demonstrate the intended logic and function implementation.
Ce document traite des procédures en programmation, notamment sur l'utilisation des sous-programmes pour éviter la répétition de séquences d'instructions. Il explique le fonctionnement de la pile en tant que zone mémoire pour stocker des adresses de retour et pour le passage de paramètres entre le programme principal et les sous-programmes.
This document presents exercises on linear programming methods, specifically focusing on the simplex method. It includes multiple exercises that involve maximizing and minimizing functions based on given constraints. The document also covers real-world applications like refinery production and optimization problems.
This document presents a series of linear programming exercises designed for an operational research course. Each exercise aims to model problems involving profit maximization, cost minimization, and feasible solutions. The exercises also include formulating linear programs and applying the simplex method.
This document discusses various exercises related to linear programming including modeling for profit maximization, cost minimization for animal feed, and techniques for finding optimal solutions such as the graphical method and the simplex method. Several exercises also provide constraints and require formulation under standard forms to solve issues pertinent to operational research.
This document consists of exercises on Linear Programming. It includes definitions, problem statements, and questions related to canonical and standard forms. The focus is on the simplex algorithm and related concepts.
This document covers exercises related to the creation and management of threads using POSIX threads (pthread) in C. It includes practical examples of thread creation, synchronization with semaphores, and controlling the execution order of threads. The document concludes with a practical case of launching threads in a specific order.


















