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.
Ce document explore différentes techniques de manipulation des fichiers texte et chaînes de caractères dans le langage de programmation R. Il détaille les méthodes pour lire, analyser, et transformer des données textuelles à l'aide de fonctions telles que readLines(), scan(), et diverses opérations sur les chaînes de caractères (e.g., toupper(), strsplit()). Les solutions d’exportation des données vers différents formats, incluant .txt, .csv, .xlsx, et .RData, sont également présentées. Ceci constitue un guide pratique pour les utilisateurs travaillant avec des données textuelles et chercha...
This document is a practical assignment focusing on the concepts of inheritance and polymorphism in Java through the creation of classes with specific attributes and behaviors. It introduces tasks such as extending a 'Point' class to create a 'PointCol' class with RGB color attributes and related methods. Additionally, it involves modeling an enterprise's employee management system using a hierarchy of classes: 'Salarie', 'Employe', and 'Vendeur,' employing respective constructors, getters/setters, and methods for displaying and calculating salaries. The task concludes with a test program t...
This hands-on Java tutorial focuses on mastering the fundamental concepts of object-oriented programming. It includes step-by-step exercises that guide students through defining classes, declaring class members, and using constructors and methods. The task involves creating and manipulating a `Point` class to understand instantiation, method calls, and operations such as resetting and testing equality. Advanced exercises include defining custom methods like `toString`, and equality-checking methods like `coincide_V1` and `coincide_V2` to deepen comprehension.
This document introduces the basics of object-oriented programming using Java. It provides a step-by-step guide for setting up the programming environment (JDK and Eclipse) and performing simple Java coding tasks, including writing and running 'Hello World', handling command-line arguments, working with classes and objects, and understanding methods and attributes in Java. It concludes with instructions on integrating and testing projects in the Eclipse IDE to facilitate hands-on learning.
This document provides a detailed explanation of modifying variable properties in SPSS. It covers defining multiple variables, calculating new variables, and aggregating data. Additionally, the document includes practical activities for applying the concepts learned.
This document consists of two key activities focusing on advanced Python programming concepts. The first activity leverages decision trees for regression analysis, involving the creation and visualization of predictive tree models using libraries like numpy, matplotlib, and sklearn. The second activity introduces linear regression, emphasizing model training and prediction using scikit-learn while highlighting data preprocessing and differences upon modifying certain code aspects. Both activities employ practical examples to foster understanding, featuring visualization outputs and file gen...
This document outlines a Python-based activity executed in the Spyder IDE provided by the Anaconda distribution. The activity involves importing a dataset, manipulating directories, performing basic descriptive statistics, and visualizing pairwise variable relationships in the data. Key steps include importing necessary libraries like pandas, using functions to compute data dimensions and descriptive statistics, and generating scatter plot matrices for visual exploration.
Ce document présente une série d'exercices pour un cours sur le développement en VB.Net. Les exercices portent sur différents aspects de la programmation, tels que la gestion de fichiers, la création d'interfaces utilisateur, et le calcul d'indices spécifiques à partir de données. Chaque exercice inclut des détails sur les exigences techniques et les résultats attendus.
This lab focuses on modifying SSIS packages to incrementally extract data from various sources. The goal is to ensure that only records added or modified since the last extraction are processed. Techniques including Change Data Capture and Change Tracking are utilized to optimize data extraction processes.
Ce document détaille les approches pour lire, manipuler et exporter des fichiers texte dans le langage R. Il présente diverses méthodes telles que readLines() et scan() pour importer des fichiers, ainsi que des fonctions pour la manipulation de chaînes comme nchar() et substr(). Les techniques d'exportation de données vers différents formats comme .txt, .csv, .xlsx et .RData sont également expliquées. Enfin, il introduit l'utilisation de bibliothèques externes comme xlsx pour l'exportation avancée.
This document covers various operations regarding text file handling in R, specifically focusing on reading, writing, and processing text data. A dataset called The_Artist.txt is used for practical examples throughout the module. It includes methods for reading text files and manipulating string data.
This document covers the importation and reading of CSV and Excel files in R. It provides practical examples of downloading data and loading it into R. Key functions and libraries needed for processing these file types are discussed.
This document discusses the evaluation of performance for inverse algorithms in EEG data analysis. It emphasizes the importance of having a ground truth and a defined evaluation criterion to assess the algorithms' effectiveness quantitatively. The focus is placed on comparing the active dipoles from original configurations with those estimated by algorithms such as Gibbs sampler, MNE, and SISSY through various simulations.
This document describes step-by-step instructions for executing various data analysis tasks in SPSS. Key tasks include generating variables for the global invoice amounts, calculating descriptive statistical summaries, and separating data based on subscriber type and tenure. Additionally, the report outlines procedures for recoding data and summarizing complaints, along with a cross-tabulation by subscriber type for a comprehensive analysis.
This document presents a lab exercise on pointers in C. It includes tasks for memory allocation, array processing, and manipulation of dynamic structures. Various exercises aim to reinforce understanding of pointers and dynamic memory management.
The document introduces the implementation of a Java class to model bank accounts, focusing on the principles of encapsulation and object-oriented programming. It specifies account attributes, including account number, holder's identity, balance, and constraints such as overdraft limits and maximum allowed withdrawals. The methodology requires defining constructors, accessors, modifiers, and custom methods like overdraft checks, deposits, withdrawals, and account transfers. Finally, the exercise includes testing functionalities using a companion testing class to validate specified behaviors...
This document is a lab exercise designed for a first-year programming course focusing on algorithmic structure and data handling in C. It includes multiple exercises involving arrays, functions, and structures, particularly centered around player data in rugby and participant management in tennis competitions. Additionally, it covers date manipulation and stock management practices.
This document presents a Java program for creating and animating circles within a graphical user interface. It uses event handling to control drawing and animation of circles in random colors and positions. The program includes three buttons for drawing, animating, and stopping the animation.
Ce document porte sur l'algorithmique et les structures de données, avec plusieurs exercices pratiques. Les exercices incluent l'écriture de programmes C pour gérer les informations des joueurs de rugby et la gestion des participants à des compétitions de tennis. Chaque exercice a des objectifs clairs et nécessite l'utilisation appropriée de structures de données.
This document outlines a lab exercise focused on programming functions in C. It includes tasks for finding minimum and maximum values, calculating a series sum, and working with arrays and matrices. The exercises aim to strengthen understanding of algorithmic principles and data handling in programming.
This document covers the access to data via Java Persistence API (JPA), detailing how to manage data states including insertion, updating, and deletion of records. It also discusses querying methods using JPQL and CriteriaQuery with their pros and cons. Examples of code implementation are provided for practical understanding.
This lab focuses on extracting customer and sales order data from the InternetSales database and loading it into a Staging database. Participants will learn to extract and profile source data as well as implement a data flow using transformations. The exercises include preparing the lab environment and analyzing source data.
Ce document pr sente un travail pratique sur la programmation orient e objet, visant apprendre des notions telles que l'h ritage, les classes abstraites et les interfaces. Les tudiants doivent cr er un programme g rant le stock d'un magasin en respectant une hi rarchie de classes et d'interfaces. Les t ches incluent le codage des interfaces et des classes, ainsi que la simulation des op rations de vente.
This document outlines a lab exercise for second-year students focused on Object-Oriented Programming. It includes exercises related to class creation, inheritance, and method overriding. Students will implement classes for articles and vehicles, applying key OOP concepts.















