Está en la página 1de 2

#include <iostream>

#include <string>
using namespace std;

//EVALUCION IGUAL QUE LA UTH


class historial
{
public:
historial(string materia, double ingresonotas, double resultado)
{
Materia = materia;
Ingresonotas = ingresonotas;
resultado = resultado;
}
void obtener_materia(string materia)
{
Materia = materia;
}
void obtener_ingresonotas(double ingresonotas)
{

Ingresonotas = ingresonotas;
}
void obtener_resultado(double resultado)
{
Resultado = resultado;
}
string establecer_materia()
{
return Materia;
}
double establecer_ingresonotas()
{

cout << "ingrese nota 1: " << endl;


cin >> nota1;
cout << "ingrese nota 2: " << endl;
cin >> nota2;
cout << "ingrese nota 3:" <<endl;
cin >> nota3;
Resultado = nota1 + nota2 + nota3 ;
return Ingresonotas;
}

double establecer_resultado()

{
if (Resultado >= 0, Resultado <= 69)
{
cout << "REPROVADO" << endl;
}
else
if (Resultado >= 70, Resultado <= 100)
{
cout << "APROVADO" << endl;
}
return Resultado;

}
private:
string Materia;
double Ingresonotas,nota, Resultado, nota1, nota2, nota3;
};

int main()
{

string m;

historial notas("", 0, 0);


cout << "ingrese materia: "<<endl;
cin >> m;
notas.obtener_materia(m);
cout << "ingrese notas: " << endl;
notas.establecer_ingresonotas();

cout << "clase: " << notas.establecer_materia() << endl;


cout << "su nota es: " << notas.establecer_resultado() << endl;
system("pause");
return 0;
}

También podría gustarte