Ajout de la classe Zootheque. Ajout de la méthode AfficherListeAnimaux
continuous-integration/drone/push Build is failing Details

pull/18/head
Leana BESSON 2 years ago
parent 035bf08a03
commit b244118710

@ -6,7 +6,8 @@ using System.Runtime.InteropServices;
namespace MyProject;
class Program
{
public static Especetheque Especetheque { get; set; } = Stub.LaodEspecetheque();
public static Especetheque Especetheque { get; } = Stub.LaodEspecetheque();
public static Zootheque Zootheque { get; set; } = new Zootheque();
static void Main(string[] args)
{
@ -93,6 +94,8 @@ class Program
switch (choix)
{
case 1:
Console.Clear();
Zootheque.AfficherZootheque();
break;
case 2:
break;

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class Zootheque
{
HashSet<Animal> ListeAnimaux = new HashSet<Animal>();
public Zootheque()
{
}
public void AfficherZootheque()
{
Console.WriteLine("VOS ANIMAUX : ");
foreach (Animal animal in ListeAnimaux)
{
Console.WriteLine(animal.Nom);
}
}
}
}
Loading…
Cancel
Save