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.

Programming in Java

This document provides an introduction to programming in Java using the Java Development Kit (JDK). It outlines the steps for installing JDK, compiling Java code, and executing Java programs. Additionally, it includes practical exercises for reinforcing concepts such as class creation and method invocation.

thode
classe
segment
8p0
Programmation par objets en Java (GLIN 505)

This document outlines a course on object-oriented programming in Java, focusing on the implementation of generic classes and data structures. It includes exercises on creating generic stacks, sorting algorithms, and implementing generic queues with priority. The material is intended for students in their second year of university.

classe
public
java
4p0
Programmation Orientée Objets et Evénementielle

This document discusses concepts related to Object-Oriented Programming in Java, with a focus on class hierarchy, inheritance, and polymorphism. It includes code examples for classes representing books and comic books. Additionally, it contains exercises to reinforce understanding of these concepts.

quot
classe
afficher
7p0
Java Object-Oriented Programming Exercise

This document contains exercises for a lab focused on Object-Oriented Programming in Java. Students will create classes representing polygons and geometric shapes, implement methods for calculations and comparisons, and utilize polymorphism through method overriding. The exercises aim to solidify understanding of class design and object manipulation in Java.

thode
classe
cercle
3p0
Corrigés des premiers exercices sur les classes

This document contains solutions to initial exercises on classes, specifically a banking account class and its methods. It includes practical coding examples in Java for creating accounts, depositing and withdrawing money, and transferring funds between accounts. Additionally, it covers the creation and management of an array of accounts with related operations.

compte
quot
solde
9p0
Fiche Exercices POO- JAVA UEO55.1

This document contains exercises related to object-oriented programming principles in Java, focusing on class visibility, class relationships, code analysis, concepts of inheritance, generics, and cloning. It presents various coding scenarios and questions that assess understanding of the Java language and object-oriented design.

public
classe
points
12p0
Programmation Orientée Objets et Evénementielle

The document details an exam on Object-Oriented Programming using Java, focusing on class hierarchy, inheritance, and polymorphism. It presents exercises analyzing a Java program that involves classes for books, comics, and coloring albums. Additionally, it includes questions regarding class attributes and functionality.

quot
classe
afficher
7p0
Modélisation Dynamique

Ce document traite de la modélisation dynamique à travers divers exercices. L'Exercice 1 porte sur un guichet automatique de banque, tandis que l'Exercice 2 concerne un système de réservation de billets de train. L'Exercice 3 implique la conception d'un logiciel de gestion pour un club sportif, en se concentrant sur l'inscription des membres aux cours privés.

syste
mode
inscription
École Nationale des Sciences de l'Informatique (ENSI)4p0
Priority Queue and Traffic Simulation Exercises using Java

The document discusses the implementation of data structures and simulations using Java programming. The first exercise focuses on developing a generic priority queue system (class FilePrio) that manages information based on given priority levels, incorporating methods to add, fetch, and query information. The second exercise extends the concept to simulate traffic at a four-way intersection (class Carrefour) using a priority system for vehicles, with ambulances prioritized over cars and each type governed by specific queues. These implementations serve as demonstrations of object-oriented...

priority queue
FilePrio
Carrefour
1p0
Implementation and Simulation of Priority Queues and Traffic Systems in Java

The document introduces the concept of priority queues and their implementation in Java via the 'FilePrio' class, which supports generic storage and three primary methods: entering, retrieving, and consulting information based on priority. A secondary problem simulates traffic management at a four-street intersection using the 'Carrefour' class, prioritizing ambulances over cars and ordering cars based on defined street hierarchies. Both tasks demonstrate the utilization of priority queues to handle real-world scenarios of data prioritization and resource management effectively.

priority queue
FilePrio class
Carrefour class
1p0
MMaattiièèrree PPrrooggrraammmmaattiioonn OOrriieennttééee OObbjjeett

This document presents exercises focused on Object-Oriented Programming concepts in Java, specifically classes and objects. It includes the implementation of a 'Point' class, a 'Personne' class, and a 'Date' class, with detailed methods and constructors. The exercises are designed for second-year students and aim to solidify their understanding of object instantiation and data representation.

personne
quot
date
4p0
Systèmes d’Exploitation & Programmation Concurrente

This document contains an exam issued by the Ecole Nationale des Sciences de l’Informatique for the 2018/2019 academic year focused on operating systems and concurrent programming. It includes various exercises covering process creation, concurrency issues, and synchronization techniques, encouraging clear and concise responses. The exam aims to assess students' understanding of key concepts in concurrent processing and synchronization mechanisms.

processus
priorite
temps
8p0
Des maths avec Python

Ce document présente des méthodes numériques pour trouver les zéros d'une fonction, en mettant l'accent sur les méthodes de recoupement par intervalles, de dichotomie et de regula falsi. Il fournit des exercices pratiques pour mettre en œuvre ces méthodes à l'aide de Python. L'auteur aborde également la difficulté de résoudre certaines équations polynomiales algébriquement.

fonction
thode
exercice
9p0
Les jeux d’instructions MIPS

This document contains exercises designed to translate C programming constructs into MIPS assembly language instructions. It includes tasks for conditional statements, loops, and array manipulation, along with recursive function design. The exercises also cover the conversion of data into separate categories based on conditions.

exercice
ecrire
source
2p0
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
Programming Exercises in Java

The document provides multiple Java programming exercises focused on creating GUI applications to compute the area and perimeter of a rectangle and manipulate list selections. It details implementations such as using Swing components for user input validation, button interactions, and dynamic menu-driven options for computations. The solutions emphasize event handling and input validation. Furthermore, it introduces list-based GUI displays with actions triggered by selections, showcasing practical examples of Java development for beginners.

GUI development
Rectangle computations
Swing Framework
Institut Supérieur des Études Technologiques9p0
Les interfaces graphiques en Java

This document explores GUI design in Java through three exercises focusing on calculating rectangle properties, dynamically updating UI elements based on user input, and implementing a menu for calculations. The first exercise involves writing a program to calculate surface area and perimeter with input validation. The second exercise develops a window with interactive list-based buttons for programming language selection, offering two update mechanisms. The third exercise creates a menu-based UI for entering rectangle dimensions and performing calculations, featuring user-friendly input bo...

Java
Rectangle calculations
Graphical User Interfaces (GUIs)
2p0
Polymorphisme en C++

This document covers polymorphism in C++ through exercises involving class inheritance and virtual functions. Key concepts include method overriding and the behavior of virtual and non-virtual methods. It also involves hands-on coding examples to illustrate these concepts.

quot
const
cout
École Nationale des Sciences de l'Informatique (ENSI)3p0
Généricité & Collections en JAVA

This document introduces the concept of generic programming and its application to collections in Java. It transitions from fundamental implementations of stacks, using linked lists and arrays, to more advanced variations utilizing Java's generics. Various exercises encompass creating generic classes, implementing abstract data types, and utilizing Java's core collection framework with examples of ArrayList, LinkedList, and HashMap. Additionally, an exercise guides the creation of a task management system using object relationships and generics for modularity and scalability.

generics
Collection API
type safety
9p0
Gestion des exceptions en JAVA

The document elaborates on designing and handling exceptions in Java through structured exercises. It contrasts checked and unchecked exceptions, illustrating why certain methods compile without errors while others require explicit exception handling. The exercises delve into hierarchical exception management with try-catch-finally blocks, explaining behavior under varying exception instances and exploring custom exception handling mechanisms, such as AgeCapException. The final part introduces iterative exception handling with error tracking for user input validation.

exceptions
RuntimeException
IOException
3p0
Optimisation Combinatoire : Méthodes Approchées

This document discusses solving combinatorial optimization problems, particularly focusing on the Traveling Salesman Problem (TSP) using genetic algorithms. It includes a specific coding approach for the problem and outlines a multi-objective knapsack problem with constraints. The proposed solutions involve transforming problems into single-objective formats and applying greedy algorithms.

quot
probl
algorithme
3p0
Complexité Algorithmique

This document contains an exam focused on algorithmic complexity, detailing various problems related to complexity classes, computational operations, and permutations. Students are required to analyze the performance and complexities of algorithms through theoretical and practical exercises. The exam is structured to test understanding of asymptotic notations and their applications in real scenarios.

quel
complexite
donner
1p0
Complexité Algorithmique

This document presents an exam for the module on algorithmic complexity, including problems on matrix multiplication, hash algorithms, and asymptotic complexity. Students are required to write algorithms, analyze time complexity, and calculate asymptotic complexities for given operations. The exam is structured into three main exercises, each targeting different aspects of algorithmic analysis.

while
complexite
rations
1p0

Autres ressources en programmation