Académique Documents
Professionnel Documents
Culture Documents
#include <fstream>
#include <vector>
#include "Patient.h"
#include "Medecin.h"
int main() {
int choix;
bool ajouterAutre = true;
while (ajouterAutre) {
std::cout << "Que souhaitez-vous faire ?\n";
std::cout << "1. Ajouter un nouveau patient\n";
std::cout << "2. Ajouter un nouveau medecin\n";
std::cout << "3. Quitter le programme\n";
std::cout << "Votre choix : ";
std::cin >> choix;
if (choix == 1) {
std::string nom, prenom, adresse, maladie;
std::cout << "\nAjout d'un nouveau patient :\n";
std::cout << "Nom : ";
std::cin >> nom;
std::cout << "Prenom : ";
std::cin >> prenom;
std::cout << "Adresse : ";
std::cin.ignore();
std::getline(std::cin, adresse);
std::cout << "Maladie : ";
std::getline(std::cin, maladie);
char reponse;
std::cout << "Voulez-vous ajouter ce medecin ? (o/n) : ";
std::cin >> reponse;
include "Employer.h"
Employe::~Employe() {}
#ifndef EMPLOYE_H
#define EMPLOYE_H
#include "Personne.h"
public:
Employe(const std::string& nom, const std::string& prenom, const std::string& adresse,
const std::string& fonction);
virtual ~Employe();
#endif // EMPLOYE_H
#include "Medecin.h"
Medecin::~Medecin() {}
std::string Medecin::getSpecialite() const {
return specialite;
}
#ifndef MEDECIN_H
#define MEDECIN_H
#include "Employer.h"
public:
Medecin(const std::string& nom, const std::string& prenom, const std::string& adresse,
const std::string& fonction,
const std:##:string& specialite);
~Medecin();
#endif // MEDECIN_H
#include "Patient.h"
#ifndef PATIENT_H
#define PATIENT_H
#include <string>
#include "Personne.h"
public:
Patient(const std::string& nom, const std::string& prenom, const std::string& adresse,
const std::string& maladie);
#endif // PATIENT_H
#include "Personne.h"
Personne::~Personne() {}
#ifndef PERSONNE_H
#define PERSONNE_H
#include <string>
class Personne {
protected:
std::string nom;
std::string prenom;
std::string adresse;
public:
Personne(const std::string& nom, const std::string& prenom, const std::string& adresse);
virtual ~Personne();
#endif // PERSONNE_H