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.

Module PO: Inheritance and Polymorphism

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.

Inheritance
Polymorphism
Point and Rectangle Classes
Institut Supérieur des Études Technologiques de Bizerte1p0
Programmation Orientée Objet

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.

programme
ecrire
tableau
2p0
Généricité et collections en 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...

generics
collections
Java
9p0
Genericity & Collections in Java

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.

Genericity
Java Collections API
Stack Implementation
9p0
Exceptions and Abstract Classes - Java Exercises

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

NumberFormatException
TabTrie abstract class
SecretMissionException
7p0
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
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
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
Logiques non classiques

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.

train
tunnel
cotedt2
Université de la Manouba2p0
Programmation Orientée Objet (Java): Série n°2 Classes et Objets

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

object-oriented programming
Java
class structure
5p0
Exercice d’application en Java RMI

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.

java
quot
clementine
7p0
Balises WSDL dans un service web et leurs équivalents Java

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.

quot
wsdl
soap
8p0
Systèmes et Applications Répartis

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.

serveur
information
findh
10p0
Exam on Distributed Systems and Applications

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.

fichier
rectangle
java
8p0
Systèmes d’exploitation & Programmation Concurrente II

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.

processus
mutex
pthread
6p0
Systèmes d’exploitation & Programmation Concurrente II2

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.

thread
etudiants
threads
6p0
Series d'Exercices et Corrige

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.

liste
fonction
exercice
20p0
Les procédures

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.

pile
programme
architecture
22p0
Programmation linéaire

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.

deux
prix
machine
5p0
Recherche Opérationnelle - Programmation Linéaire

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.

programme
aire
sous
5p0
Programmation linéaire : Exercices modélisation et optimisation

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.

programme
aire
sous
5p0
Devoir de Maison de Programmation Linéaire

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.

donner
sous
base
6p0
Thread POSIX

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.

pthread
quot
void
3p0

Autres ressources en programmation