Travaux pratiques (TP) - Programmation

91 documents à télécharger gratuitement

Travaux pratiques (TP) de programmation partagés par des étudiants et des enseignants. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.

Atelier N°0 : Initiation à la technologie Java EE

This document serves as a guide for an introductory workshop aimed at familiarizing learners with Java EE technology and the MVC design framework. It begins by explaining Java EE, its purpose, and how it supports robust and distributed web application development. The functioning of client-server communication via HTTP is dissected, alongside the role of application servers like Apache Tomcat in handling requests and responses. Finally, the document outlines the MVC (Model-View-Controller) design pattern, detailing its components and their roles in enhancing modularity, collaboration, and m...

Java EE
HTTP protocol
MVC (Model-View-Controller)
Institut Supérieur des Études Technologiques de Bizerte6p0
Correction du TP 8 : Classe abstraite & Interface

This document provides exercises related to abstract classes and interfaces in Java, demonstrating the implementation of inheritance and polymorphism. Key methodologies include abstract class creation, the use of interfaces, and the differentiation between non-discounted and discounted products through specialized constructors and methods. The findings showcase the calculation of product prices and selection based on maximum price logic, integrating both abstract methods from classes and interface implementations. Examples are executed via a `main` method to test the functionalities.

abstract class
interface
inheritance
6p0
TP N°7: Héritage / Polymorphisme — Dérivations Successives

This document emphasizes the application of inheritance and polymorphism principles in object-oriented programming using Java. It outlines the design and implementation of multiple classes representing various library documents, with Document as a superclass and specific subclasses such as Livre, Roman, Manuel, Revue, and Dictionnaire. It demonstrates key features like method overriding, accessor methods, and constructors, while also detailing test scenarios to validate the functionality via various interactions. This practical exercise culminates in implementing specialized library classes...

inheritance
polymorphism
constructor
5p0
POO - Correction du TP 8

This document focuses on abstract classes and interfaces in the context of product management. It implements classes for both discounted and non-discounted products, showcasing polymorphism and inheritance. A main program calculates and identifies the product with the highest total value. Interfaces are then utilized to redefine the product functionality, enhancing flexibility and separation of concerns.

abstract class
interface
inheritance
6p0
Compilation de bibliothèque statique

This document provides a step-by-step guide for compiling a static library in C. It includes the creation of a factorial function implementation and a program to utilize this function. The document also outlines the compilation commands necessary to produce an executable from the static library.

factorielle
bibliothe
quot
4p0
TP4 C# - Déplacement des éléments d’une liste vers une autre liste

This document explains the development of a C# application to handle element transfer between two lists using various user interfaces facilitated by a TabControl component with four TabPages. It offers functionality for single and multiple selections in ListBox and CheckListBox controls, alongside features embracing 'drag-and-drop' capabilities. Buttons are provided to add, remove, clear, and transfer elements between the lists. Key C# properties and methods related to ListBox operations, as well as Drag-and-Drop event handling, are described in the annex for reference.

C#
ListBox
Drag-and-Drop
5p0
Correction du TP n°7 - Exceptions et Classes Abstraites

This document explores exception handling and abstract classes in Java through exercises and detailed code examples. It demonstrates practical implementation of exception propagation, custom exceptions, constructors with exceptions, and the `finally` clause. Abstract classes are utilized to design a sorted object structure, comparing their usage with interfaces. Key findings include the role of `finally` in exception control flow and the power of abstraction for structured problem-solving.

Exception Handling
parseInt
SecretMissionException
7p0
Atelier Programmation Objet Avancée

The document serves as a step-by-step practical guide for working with Java collections, including ArrayLists, Vectors, LinkedLists, and HashMaps. Each section provides instructions for creating and manipulating data structures, such as adding elements, iterating, sorting, and using specialized methods like addFirst and addLast for linked lists. Additionally, the HashMap section introduces key-value pair manipulation and search techniques, emphasizing systematic output for observation. Overall, the methodology highlights iterative and customizable development practices for advanced object-o...

Java collections
ArrayList
LinkedList
Institut Supérieur des Études Technologiques1p0
POO – Classes Abstraites et Interfaces

This document introduces abstract classes and interfaces as fundamental concepts in object-oriented programming. The methodology involves defining abstract classes that cannot be instantiated but serve as base classes for derived classes, which implement abstract methods. Interfaces are presented as constructs defining only method signatures and constants, enabling multiple inheritance and inter-class interaction. Practical examples illustrate syntax, implementation, and the functional importance of both constructs in software development.

abstract class
interface
inheritance
33p0
POO – Classes Abstraites et Interfaces

This document introduces the concepts of abstract classes and interfaces as core components of object-oriented programming. The methodology includes an explanation of syntax, rules, and practical applications of abstract classes and interfaces. Abstract classes are designed to serve as base classes, providing structure for derivative implementations. Interfaces allow multiple inheritance-like behavior by enabling the implementation of common method signatures without imposing specific inheritance structures. Examples illustrate abstract methods, interfaces with constants, and conflict resol...

abstract class
interface
inheritance
8p0
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
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
Encapsulation et concepts de POO - TP4

This document delves into the implementation of Java classes to model bank accounts, focusing on key object-oriented programming principles such as encapsulation, accessors, and mutators. It mandates creating a `Compte` class with attributes, constructors, methods for crediting, debiting, and transferring funds, alongside rules for overdraft and maximum debit limits. The tasks include implementing private attributes, defining methods for account management, and creating a `TestCompte` class to validate functionality. The primary focus is on reinforcing conceptual understanding of OOP while...

encapsulation
toString
object-oriented programming
3p0
Java Practical Work

This document provides a series of Java practical exercises designed to familiarize students with key programming concepts such as object-oriented programming, inheritance, and interfaces. It includes exercises to create and manipulate classes like 'Date', 'Point', 'TableauTrie', and 'Coordonnees', encouraging encapsulation and method implementation. The methodology incorporates practical testing within Java environments, focusing on hands-on coding tasks. Various core aspects of Java including exception handling, polymorphism, and abstract classes are covered in these exercises.

Java
Date class
Object-oriented programming
27p0
TP POO - Séance 03

This document serves as lecture notes for object-oriented programming, focusing on the concepts of variables, methods, and object manipulation through practical exercises. It introduces foundational concepts such as instance variables, class variables, and local variables alongside constructors and methods for object creation, data access, and management. Practical tasks guide readers through the creation of classes and methods to represent and manipulate points on a Cartesian plane and implement address books in programming. Exercises require basic functionality expansions, including const...

variables
constructors
methods
20p0
Eléments de correction du TP 4

This document contains correction elements for TP 4 focused on AWK and SED programming exercises. It includes various examples and explanations for using AWK and SED commands effectively. Each exercise addresses different scenarios to strengthen understanding of text processing in Unix-like environments.

fichier
toto
chai
1p0
COMPTE RENDU DES TRAVAUX PRATIQUES

This document contains a report on practical work related to Java Remote Method Invocation (RMI). It includes various programming exercises and implementations of remote interfaces. The students Amani BEN DHIAB and Mohamed Yassine CHAIEB conducted the exercises under the guidance of Mme. Nadia BEN AZZOUNA during the academic year 2012-2013.

java
quot
fichier
École Nationale des Sciences de l'Informatique (ENSI)9p0
COMPTE RENDU DES TRAVAUX PRATIQUES

This document presents a lab report on Java RMI programming, including the implementation of remote methods for mathematical calculations. It covers the creation of server and client classes, compilation steps, and execution instructions. Additionally, it outlines exercises focusing on various Java RMI concepts and practices.

java
quot
fichier
9p0
Compte rendu TP JAVA/RMI

This document provides a detailed account of a JAVA/RMI lab exercise conducted by students. It covers the implementation and testing of various Java classes related to remote method invocation. Additionally, it includes steps for server and client setup as well as object factory implementation.

java
client
fichier
26p0
Compte rendu TP JAVA/RMI

This document reports on a lab exercise focused on Java RMI. It includes multiple exercises requiring the implementation and testing of RMI components such as client and server applications. The final sections cover code examples and testing instructions.

java
question
serveur
14p0
TP1: 1ère Application .NET avec C#

This document outlines the process of developing a Windows Forms application in Visual Studio 2010 using C#. It introduces key concepts like projects and solutions, as well as the interface elements within the Visual Studio environment. The tutorial provides a step-by-step guide to building a simple calculator application, covering user interface design, properties configuration, and event-driven coding for arithmetic button functionality. Additional features like interfacing with multiple forms and debugging techniques are also highlighted.

C#
.NET
Visual Studio 2010
8p0
TP2 : Réalisation d’une Facture

This practical exercise involves designing an interface for a billing system, processing product data to compute line item totals, and determining the total amount, discount, and net payable. Key components use TextBox controls for data input, Buttons to trigger calculations, and a Timer control to display the current date and time dynamically. The task requires implementing conditional logic for the discount calculation and handling KeyPress events to automate focus changes between controls during user interaction.

arithmetic operators
KeyPress event
Timer control
3p0
Programmation Web 2 - TP1 : Rappel sur les cadres

This document is a practical lab assignment for creating a small website by utilizing different web techniques. It is divided into three parts, starting with the use of framesets, followed by <div> tags and stylesheets, and finally leveraging features from HTML5 and CSS3. The assignment includes creating a multi-page website with specific layout requirements, such as individual pages for header (entete.html), menu (menu.html), content (contenu.html), and footer (footer.html), which are combined in a main index.html page using framesets for layout definition. Detailed visual and structural r...

Frameset
HTML5
CSS3
Institut Supérieur des Études Technologiques3p0

Autres ressources en programmation