Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TP magasin
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
Merge Requests
0
Merge Requests
0
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
Alan BILLY
TP magasin
Commits
600f86b0
Commit
600f86b0
authored
Nov 24, 2023
by
Alan BILLY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout du projet Magasin fini
parent
163d873d
Pipeline
#2231
failed with stages
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
112 additions
and
1 deletion
+112
-1
settings.json
Magasin/.vscode/settings.json
+7
-0
AssemblagePC.java
Magasin/src/Commande/AssemblagePC.java
+18
-0
AssemblageServeur.java
Magasin/src/Commande/AssemblageServeur.java
+18
-0
Commande.java
Magasin/src/Commande/Commande.java
+5
-0
Main.java
Magasin/src/Main.java
+20
-0
Site.java
Magasin/src/Site/Site.java
+6
-0
SiteConcerne.java
Magasin/src/Site/SiteConcerne.java
+26
-0
README.md
README.md
+12
-1
No files found.
Magasin/.vscode/settings.json
0 → 100644
View file @
600f86b0
{
"java.project.sourcePaths"
:
[
"src"
],
"java.project.outputPath"
:
"bin"
,
"java.project.referencedLibraries"
:
[
"lib/**/*.jar"
]
}
Magasin/src/Commande/AssemblagePC.java
0 → 100644
View file @
600f86b0
package
Commande
;
import
Site.Site
;
public
class
AssemblagePC
implements
Commande
{
private
Site
site
;
public
AssemblagePC
(
Site
site
)
{
this
.
site
=
site
;
}
@Override
public
void
executer
()
{
site
.
AssemblagePC
();
}
}
Magasin/src/Commande/AssemblageServeur.java
0 → 100644
View file @
600f86b0
package
Commande
;
import
Site.Site
;
public
class
AssemblageServeur
implements
Commande
{
private
Site
site
;
public
AssemblageServeur
(
Site
site
)
{
this
.
site
=
site
;
}
@Override
public
void
executer
()
{
site
.
AssemblageServeur
();
}
}
Magasin/src/Commande/Commande.java
0 → 100644
View file @
600f86b0
package
Commande
;
public
interface
Commande
{
public
void
executer
();
}
Magasin/src/Main.java
0 → 100644
View file @
600f86b0
import
Commande.AssemblagePC
;
import
Commande.AssemblageServeur
;
import
Commande.Commande
;
import
Site.Site
;
import
Site.SiteConcerne
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
Site
site
=
SiteConcerne
.
getInstance
();
// Création des commandes
Commande
commandePC
=
new
AssemblagePC
(
site
);
Commande
commandeServeur
=
new
AssemblageServeur
(
site
);
// Exécution des commandes
commandePC
.
executer
();
commandeServeur
.
executer
();
}
}
Magasin/src/Site/Site.java
0 → 100644
View file @
600f86b0
package
Site
;
public
interface
Site
{
public
void
AssemblagePC
();
public
void
AssemblageServeur
();
}
Magasin/src/Site/SiteConcerne.java
0 → 100644
View file @
600f86b0
package
Site
;
public
class
SiteConcerne
implements
Site
{
private
static
SiteConcerne
instance
;
private
SiteConcerne
()
{
}
public
static
SiteConcerne
getInstance
()
{
if
(
instance
==
null
)
{
instance
=
new
SiteConcerne
();
}
return
instance
;
}
@Override
public
void
AssemblagePC
()
{
System
.
out
.
println
(
"Assemblage d'un PC"
);
}
@Override
public
void
AssemblageServeur
()
{
System
.
out
.
println
(
"Assemblage d'un Serveur"
);
}
}
README.md
View file @
600f86b0
# TP magasin
```
.
└── src
├── Commande
│ ├── AssemblagePC.java
│ ├── AssemblageServeur.java
│ └── Commande.java
├── Main.java
└── Site
├── Site.java
└── SiteConcerne.java
```
\ No newline at end of file
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