Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uv-amse-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lucas NAURY
uv-amse-android
Commits
bee9c773
Commit
bee9c773
authored
Feb 16, 2024
by
Lucas NAURY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout d'un ID automatique aux annonces
parent
22f3550c
Pipeline
#2720
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Annonce.java
...src/main/java/com/example/tpleboncoin/models/Annonce.java
+8
-2
No files found.
app/src/main/java/com/example/tpleboncoin/models/Annonce.java
View file @
bee9c773
package
com
.
example
.
tpleboncoin
.
models
;
package
com
.
example
.
tpleboncoin
.
models
;
public
class
Annonce
{
public
class
Annonce
{
static
int
nbAnnonces
=
0
;
private
int
id
;
private
String
titre
;
private
String
titre
;
private
String
adresse
;
private
String
adresse
;
private
int
image
;
private
int
image
;
//Constructeur
//
Constructeur
public
Annonce
(
String
titre
,
String
adresse
,
int
image
)
{
public
Annonce
(
String
titre
,
String
adresse
,
int
image
)
{
this
.
titre
=
titre
;
this
.
titre
=
titre
;
this
.
adresse
=
adresse
;
this
.
adresse
=
adresse
;
this
.
image
=
image
;
this
.
image
=
image
;
// Génération d'un id automatique
this
.
id
=
Annonce
.
nbAnnonces
;
Annonce
.
nbAnnonces
++;
}
}
// Getter
and
Setter
// Getter
et
Setter
public
String
getTitre
()
{
public
String
getTitre
()
{
return
titre
;
return
titre
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment