#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;
}