TP7
This commit is contained in:
32
TP7/Entreprise.cpp
Normal file
32
TP7/Entreprise.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "Entreprise.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void Entreprise::saisie(ifstream& s) {
|
||||
string tmp;
|
||||
|
||||
getline(s, m_company, ';');
|
||||
getline(s, m_country, ';');
|
||||
getfloat(s, m_market_value, ';');
|
||||
getline(s, m_sector, ';');
|
||||
getfloat(s, m_turnover, ';');
|
||||
getfloat(s, m_employees, ';');
|
||||
getint(s, m_rank_2015, ';');
|
||||
getint(s, m_rank_2014, ';');
|
||||
}
|
||||
|
||||
void Entreprise::affichage() {
|
||||
cout << m_company << " " << m_country << " " << m_market_value << " " << m_sector << " " << m_turnover << " " << m_employees << " " << m_rank_2015 << " " << m_rank_2014;
|
||||
}
|
||||
|
||||
int Entreprise::rank_progress() const {
|
||||
return m_rank_2014 - m_rank_2015;
|
||||
}
|
||||
|
||||
float Entreprise::turnover_empl() const {
|
||||
return (float)m_turnover / m_employees;
|
||||
}
|
||||
|
||||
float Entreprise::getTurnover() const {
|
||||
return m_turnover;
|
||||
}
|
||||
Reference in New Issue
Block a user