Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
R4A11_Sujet_CTP_2025
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Enzo Lamour
R4A11_Sujet_CTP_2025
Commits
2c729946
Commit
2c729946
authored
1 month ago
by
Jean-Marie Place
Browse files
Options
Downloads
Patches
Plain Diff
restore api formatting
parent
e479c772
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+27
-29
27 additions, 29 deletions
README.md
with
27 additions
and
29 deletions
README.md
+
27
−
29
View file @
2c729946
...
...
@@ -71,22 +71,20 @@ Un certain nombre d'amis (appelés participants) font une sortie. L'application
* Afficher au fur et à mesure le montant total des dépenses par poste (il y a 5 postes: TRANSPORT, HEBERGEMENT, RESTAURATION, LOISIRS, AUTRES)
* Au final afficher pour chaque participant le montant qu'il doit payer (ou recevoir) pour que chacun ait participé équitablement.
L'exemple du jeu d'essai fourni est le suivant
<!--
(les valeurs calculées par le modèle sont en
bleu)-->
:
L'exemple du jeu d'essai fourni est le suivant (les valeurs calculées par le modèle sont en
_italique_)
:
[//]: # (<div style="float:left; width:35%">)
liste des participants
| Participants |
Solde |
Détail du calcul
|
|:-------------|-----------
----------
:|:-------------------
-
|
| Ahmed |
10.50 € |
37.50 - 27.00
|
| Bruno |
-27.50 € |
37.50 + 27.50
|
| Celine |
-6.00 € |
37.50 - 43.50
|
| Déborah |
23.00 € |
37.50 - 14.50
|
| Participants |
_
Solde
_
|
_
Détail du calcul
_
|
|:-------------|-----------:|:-------------------|
| Ahmed |
_
10.50 €
_
|
_
37.50 - 27.00
_
|
| Bruno |
_
-27.50 €
_
|
_
37.50 + 27.50
_
|
| Celine |
_
-6.00 €
_
|
_
37.50 - 43.50
_
|
| Déborah |
_
23.00 €
_
|
_
37.50 - 14.50
_
|
**_NOTE_** Calcul:
cumul_total / nb_participants - cumul_participant
**_NOTE_** Calcul: `
cumul_total / nb_participants - cumul_participant
`
[//]: # (</div>)
...
...
@@ -107,14 +105,14 @@ liste des opérations
[//]: # (<div style="float:left;width:30%">)
liste des postes
| Poste |
Cumul |
|:-------------|---------------
-----
:|
| TRANSPORT |
58.50 € |
| HEBERGEMENT |
65.00 € |
| RESTAURATION |
14.50 € |
| LOISIRS |
0.00 € |
| AUTRES |
12.00 € |
| **TOTAL** |
**150.00 €** |
| Poste |
_
Cumul
_
|
|:-------------|---------------:|
| TRANSPORT |
_
58.50 €
_
|
| HEBERGEMENT |
_
65.00 €
_
|
| RESTAURATION |
_
14.50 €
_
|
| LOISIRS |
_
0.00 €
_
|
| AUTRES |
_
12.00 €
_
|
| **TOTAL** |
_
**150.00 €**
_
|
[//]: # (</div>)
...
...
@@ -158,29 +156,29 @@ L'application qui vous est fournie avec ce projet est incomplète.
Dans le cadre de ce DS, vous devez réaliser les tickets suivants:
(pour chaque ticket et en bleu, les méthodes vous fournissant les données)
1. Afficher le cumul des dépenses par poste.
<api>
getSumOperations(string)`
: affiche le cumul des opérations pour un poste.
</api>
`
getSumOperations(string)
`: affiche le cumul des opérations pour un poste.
2. Completer les classes internes `
ParticipantAdapter
` et `
ParticipantViewHolder
` pour afficher les noms des participant dans `
R.id.text1
`.
<api>
getNbParticipants: lire le nombre de participants.
</api>
<api>
getParticipant(int)
`: accès à un participant par sa position.
</api>
<api>
Participant.getName()`
: accesseur sur le nom du paticipant.
</api>
`
getNbParticipants
`
: lire le nombre de participants.
`
getParticipant(int)
`: accès à un participant par sa position.
`
Participant.getName()
`: accesseur sur le nom du paticipant.
3. Afficher le solde par participant en dessous de chaque nom (utiliser le champ `
TextView
` dont l'id est `
R.id.text2
`)
<api>
getBalance(String participant): accesseur sur le solde du participant
</api>
`
getBalance(String participant)
`
: accesseur sur le solde du participant
4. Ajouter un participant.
L'EditText `
R.id.new_participant
` permet la saisie du pseudo.
Le bouton `
R.id.add_participant
` effectuera l'ajout.
<api>
addParticipant(String): ajouter un participant.
</api>
`
addParticipant(String)
`
: ajouter un participant.
5. Si l'ajout de participant est impossible (si un participant de même pseudo existe déjà) une exception est levée.
Compléter la question précédente pour que ces exceptions soient récupérées et affichent une annonce (`
Toast
`) affichant le message lié à l'exception.
6. Ajouter un menu contextuel sur la liste des participants qui comporte un seul item qui permet de supprimer un participant.
<api>
removeParticipant(String): supprimer un participant.
</api>
`
removeParticipant(String)
`
: supprimer un participant.
7. Créer une seconde activité qui sera lancée par n'importe lequel des boutons libellé `
STATS...
`
Cette activité se présentera sous la forme affichée ci-dessus (faire le layout complet) mais seul les statistiques générales seront présentées.
<api>
getNbOperations(): affiche le nombre d'opérations totales
</api>
<api>
getSumOperation(): affiche le cumul des montants.
</api>
`
getNbOperations()
`
: affiche le nombre d'opérations totales
`
getSumOperation()
`
: affiche le cumul des montants.
8. Faire en sorte que l'appui sur le bouton `
Fermer
` fasse revenir sur l'activité initiale.
9. Complétez le projet de sorte que les statistiques propres à un poste soient affichées sur la partie inférieure (selon le bouton `
STATS...
` choisi).
<api>
getSum(String): lire le cumul pour un poste (désigné par son nom)
</api>
<api>
getNbOperations(string): affiche le nombre d'opérations pour un poste
</api>
`
getSum(String)
`
: lire le cumul pour un poste (désigné par son nom)
`
getNbOperations(string)
`
: affiche le nombre d'opérations pour un poste
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment