ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Sucursal


Enviado por   •  17 de Octubre de 2017  •  Apuntes  •  655 Palabras (3 Páginas)  •  234 Visitas

Página 1 de 3

Ejercicio Sucursal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//Sucursal.h

#include <string>

using namespace std;

class Sucursal

{

private:

string codS;

public:

Sucursal ();

void setCodS (string c);

string getCodS ();

};

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//Sucursal.cpp

#include "Sucursal.h"

Sucursal::Sucursal()

{

}

void Sucursal::setCodS (string c)

{

codS = c;

}

string Sucursal::getCodS ()

{

return codS;

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//Vendedor.h

#include <string>

using namespace std;

class Vendedor

{

private:

string nombre;

float montoV, sueldoB;

public:

Vendedor ();

void setNombre (string n);

string getNombre ();

void setMontoV (float m);

float getMontoV ();

void setSueldoB (float s);

float getSueldoB ();

float calMontoC ();

float calBono ();

float calSueldoF ();

};

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//Vendedor.cpp

#include "Vendedor.h"

Vendedor::Vendedor ()

{

}

void Vendedor::setNombre (string n)

{

nombre = n;

}

string Vendedor::getNombre ()

{

return nombre;

}

void Vendedor::setMontoV (float m)

{

montoV = m;

}

float Vendedor::getMontoV ()

{

return montoV;

}

void Vendedor::setSueldoB (float s)

{

sueldoB = s;

}

float Vendedor::getSueldoB ()

{

return sueldoB;

}

float Vendedor::calMontoC ()

{

float comision;

comision = montoV*0.17;

return comision;

}

float Vendedor::calBono ()

{

float bono;

if((montoV>15000)&&(montoV<=30000))

bono = montoV*0.07;

else if(montoV>30000)

bono = montoV*0.1;

else

bono = 0;

return bono;

}

float Vendedor::calSueldoF()

{

float sueldoF;

sueldoF= sueldoB +calMontoC() +calBono();

return sueldoF;

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//InterfaceSucursal.h

#include <string>

#include <iostream>

using namespace std;

class InterfaceSucursal {

public:

InterfaceSucursal ();

string leerCodS ();

void reporteSucursal (string c);

};

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

//InterfaceSucursal.cpp

#include "InterfaceSucursal.h"

InterfaceSucursal::InterfaceSucursal

...

Descargar como (para miembros actualizados) txt (5 Kb) pdf (63 Kb) docx (13 Kb)
Leer 2 páginas más »
Disponible sólo en Clubensayos.com