Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TP pizzeria
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 pizzeria
Commits
7b75175a
Commit
7b75175a
authored
Nov 24, 2023
by
Alan BILLY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout du projet Pizzeria
parent
e4ce74d0
Pipeline
#2223
canceled with stages
Changes
15
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
305 additions
and
0 deletions
+305
-0
settings.json
PIzzeria/.vscode/settings.json
+7
-0
FabriqueDePizza.java
PIzzeria/src/Fabrique/FabriqueDePizza.java
+6
-0
FabriqueDePizzaDuNord.java
PIzzeria/src/Fabrique/FabriqueDePizzaDuNord.java
+26
-0
FabriqueDePizzaDuSud.java
PIzzeria/src/Fabrique/FabriqueDePizzaDuSud.java
+26
-0
Main.java
PIzzeria/src/Main.java
+17
-0
Pizza.java
PIzzeria/src/Pizza/Pizza.java
+8
-0
PizzaFrite.java
PIzzeria/src/Pizza/nord/PizzaFrite.java
+27
-0
PizzaFromage.java
PIzzeria/src/Pizza/nord/PizzaFromage.java
+27
-0
PizzaNordiste.java
PIzzeria/src/Pizza/nord/PizzaNordiste.java
+27
-0
PizzaHawaienne.java
PIzzeria/src/Pizza/sud/PizzaHawaienne.java
+26
-0
PizzaPoisson.java
PIzzeria/src/Pizza/sud/PizzaPoisson.java
+26
-0
PizzaSudiste.java
PIzzeria/src/Pizza/sud/PizzaSudiste.java
+26
-0
Pizzeria.java
PIzzeria/src/Pizzeria/Pizzeria.java
+7
-0
PizzeriaDuNord.java
PIzzeria/src/Pizzeria/PizzeriaDuNord.java
+25
-0
PizzeriaDuSud.java
PIzzeria/src/Pizzeria/PizzeriaDuSud.java
+24
-0
No files found.
PIzzeria/.vscode/settings.json
0 → 100644
View file @
7b75175a
{
"java.project.sourcePaths"
:
[
"src"
],
"java.project.outputPath"
:
"bin"
,
"java.project.referencedLibraries"
:
[
"lib/**/*.jar"
]
}
PIzzeria/src/Fabrique/FabriqueDePizza.java
0 → 100644
View file @
7b75175a
package
Fabrique
;
import
Pizza.Pizza
;
public
interface
FabriqueDePizza
{
public
Pizza
creerPizza
(
String
type
);
}
PIzzeria/src/Fabrique/FabriqueDePizzaDuNord.java
0 → 100644
View file @
7b75175a
package
Fabrique
;
import
Pizza.Pizza
;
import
Pizza.nord.PizzaFromage
;
import
Pizza.nord.PizzaNordiste
;
import
Pizza.nord.PizzaFrite
;
public
class
FabriqueDePizzaDuNord
implements
FabriqueDePizza
{
@Override
public
Pizza
creerPizza
(
String
type
)
{
switch
(
type
)
{
case
"frite"
:
{
return
new
PizzaFrite
();
}
case
"fromage"
:
{
return
new
PizzaFromage
();
}
case
"nordiste"
:
{
return
new
PizzaNordiste
();
}
default
:
return
null
;
}
}
}
PIzzeria/src/Fabrique/FabriqueDePizzaDuSud.java
0 → 100644
View file @
7b75175a
package
Fabrique
;
import
Pizza.Pizza
;
import
Pizza.sud.PizzaHawaienne
;
import
Pizza.sud.PizzaPoisson
;
import
Pizza.sud.PizzaSudiste
;
public
class
FabriqueDePizzaDuSud
implements
FabriqueDePizza
{
@Override
public
Pizza
creerPizza
(
String
choix
)
{
switch
(
choix
)
{
case
"hawaienne"
:
{
return
new
PizzaHawaienne
();
}
case
"Poisson"
:
{
return
new
PizzaPoisson
();
}
case
"sudiste"
:
{
return
new
PizzaSudiste
();
}
default
:
return
null
;
}
}
}
PIzzeria/src/Main.java
0 → 100644
View file @
7b75175a
import
Pizzeria.PizzeriaDuNord
;
import
Pizzeria.PizzeriaDuSud
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
PizzeriaDuNord
pizzeriaNord
=
new
PizzeriaDuNord
();
pizzeriaNord
.
commanderPizza
(
"nordiste"
);
System
.
out
.
println
();
System
.
out
.
println
();
PizzeriaDuSud
pizzeriaSud
=
new
PizzeriaDuSud
();
pizzeriaSud
.
commanderPizza
(
"hawaienne"
);
}
}
PIzzeria/src/Pizza/Pizza.java
0 → 100644
View file @
7b75175a
package
Pizza
;
public
interface
Pizza
{
void
emballer
();
void
couper
();
void
cuire
();
void
preparer
();
}
PIzzeria/src/Pizza/nord/PizzaFrite.java
0 → 100644
View file @
7b75175a
package
Pizza
.
nord
;
import
Pizza.Pizza
;
public
class
PizzaFrite
implements
Pizza
{
@Override
public
void
emballer
()
{
System
.
out
.
println
(
"J'emballer ma pizza frite"
);
}
@Override
public
void
couper
()
{
System
.
out
.
println
(
"Je coupe mes pommes de terre en frites"
);
}
@Override
public
void
cuire
()
{
System
.
out
.
println
(
"Je cuis mes frites"
);
}
@Override
public
void
preparer
()
{
System
.
out
.
println
(
"Je prépare ma pizza frite"
);
}
}
PIzzeria/src/Pizza/nord/PizzaFromage.java
0 → 100644
View file @
7b75175a
package
Pizza
.
nord
;
import
Pizza.Pizza
;
public
class
PizzaFromage
implements
Pizza
{
@Override
public
void
emballer
()
{
System
.
out
.
println
(
"J'emballer ma pizza au fromage"
);
}
@Override
public
void
couper
()
{
System
.
out
.
println
(
"Je coupe mes morceaux de fromage"
);
}
@Override
public
void
cuire
()
{
System
.
out
.
println
(
"Je cuis mes ingrédients"
);
}
@Override
public
void
preparer
()
{
System
.
out
.
println
(
"Je prépare ma pizza au fromage"
);
}
}
PIzzeria/src/Pizza/nord/PizzaNordiste.java
0 → 100644
View file @
7b75175a
package
Pizza
.
nord
;
import
Pizza.Pizza
;
public
class
PizzaNordiste
implements
Pizza
{
@Override
public
void
emballer
()
{
System
.
out
.
println
(
"J'emballer ma pizza nordiste"
);
}
@Override
public
void
couper
()
{
System
.
out
.
println
(
"Je coupe mes ingrédients"
);
}
@Override
public
void
cuire
()
{
System
.
out
.
println
(
"Je cuis mes ingrédients"
);
}
@Override
public
void
preparer
()
{
System
.
out
.
println
(
"Je prépare ma pizza nordiste, la spécialité du chef !"
);
}
}
PIzzeria/src/Pizza/sud/PizzaHawaienne.java
0 → 100644
View file @
7b75175a
package
Pizza
.
sud
;
import
Pizza.Pizza
;
public
class
PizzaHawaienne
implements
Pizza
{
@Override
public
void
emballer
()
{
System
.
out
.
println
(
"J'emballer ma pizza Hawaienne"
);
}
@Override
public
void
couper
()
{
System
.
out
.
println
(
"Je coupe mes hananas en rondelles"
);
}
@Override
public
void
cuire
()
{
System
.
out
.
println
(
"Je cuis mes ingrédients"
);
}
@Override
public
void
preparer
()
{
System
.
out
.
println
(
"Je prépare ma pizza Hawaienne mais franchement quelle idée de mettre des ananas sur une pizza !"
);
}
}
PIzzeria/src/Pizza/sud/PizzaPoisson.java
0 → 100644
View file @
7b75175a
package
Pizza
.
sud
;
import
Pizza.Pizza
;
public
class
PizzaPoisson
implements
Pizza
{
@Override
public
void
emballer
()
{
System
.
out
.
println
(
"J'emballer ma pizza au poissons"
);
}
@Override
public
void
couper
()
{
System
.
out
.
println
(
"Je coupe mes poissons en morceaux"
);
}
@Override
public
void
cuire
()
{
System
.
out
.
println
(
"Je cuis mes ingrédients"
);
}
@Override
public
void
preparer
()
{
System
.
out
.
println
(
"Je prépare ma pizza au poissons"
);
}
}
PIzzeria/src/Pizza/sud/PizzaSudiste.java
0 → 100644
View file @
7b75175a
package
Pizza
.
sud
;
import
Pizza.Pizza
;
public
class
PizzaSudiste
implements
Pizza
{
@Override
public
void
emballer
()
{
System
.
out
.
println
(
"J'emballer ma pizza sudiste"
);
}
@Override
public
void
couper
()
{
System
.
out
.
println
(
"Je coupe mes ingrédients"
);
}
@Override
public
void
cuire
()
{
System
.
out
.
println
(
"Je cuis mes ingrédients"
);
}
@Override
public
void
preparer
()
{
System
.
out
.
println
(
"Je prépare ma pizza sudiste, la spécialité du chef !"
);
}
}
PIzzeria/src/Pizzeria/Pizzeria.java
0 → 100644
View file @
7b75175a
package
Pizzeria
;
import
Pizza.Pizza
;
public
interface
Pizzeria
{
public
Pizza
commanderPizza
(
String
type
);
}
PIzzeria/src/Pizzeria/PizzeriaDuNord.java
0 → 100644
View file @
7b75175a
package
Pizzeria
;
import
Fabrique.FabriqueDePizzaDuNord
;
import
Pizza.Pizza
;
public
class
PizzeriaDuNord
implements
Pizzeria
{
public
FabriqueDePizzaDuNord
fabrique
;
public
PizzeriaDuNord
()
{
this
.
fabrique
=
new
FabriqueDePizzaDuNord
();
}
@Override
public
Pizza
commanderPizza
(
String
type
)
{
Pizza
pizza
;
pizza
=
fabrique
.
creerPizza
(
type
);
pizza
.
preparer
();
pizza
.
cuire
();
pizza
.
couper
();
pizza
.
emballer
();
return
pizza
;
}
}
PIzzeria/src/Pizzeria/PizzeriaDuSud.java
0 → 100644
View file @
7b75175a
package
Pizzeria
;
import
Fabrique.FabriqueDePizzaDuSud
;
import
Pizza.Pizza
;
public
class
PizzeriaDuSud
implements
Pizzeria
{
public
FabriqueDePizzaDuSud
fabrique
;
public
PizzeriaDuSud
()
{
this
.
fabrique
=
new
FabriqueDePizzaDuSud
();
}
@Override
public
Pizza
commanderPizza
(
String
type
)
{
Pizza
pizza
;
pizza
=
fabrique
.
creerPizza
(
type
);
pizza
.
preparer
();
pizza
.
cuire
();
pizza
.
couper
();
pizza
.
emballer
();
return
pizza
;
}
}
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