39 lines
806 B
C++
39 lines
806 B
C++
#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() {
|
|
format(m_company, 20);
|
|
format(m_country, 15);
|
|
format(m_market_value, 10);
|
|
format(m_sector, 10);
|
|
format(m_turnover, 10);
|
|
format(m_employees, 6);
|
|
format(m_rank_2015, 3);
|
|
format(m_rank_2014, 3);
|
|
}
|
|
|
|
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;
|
|
} |