Skip to content

Instantly share code, notes, and snippets.

@Kevin-Gomez10
Created June 23, 2021 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kevin-Gomez10/6af427ad4e6712266405d1d1235adadf to your computer and use it in GitHub Desktop.
Save Kevin-Gomez10/6af427ad4e6712266405d1d1235adadf to your computer and use it in GitHub Desktop.
UIII POO Act16 clase estudiante herencia persona v2
#include <iostream>
using namespace std;
#include "joan.h"
// Funciones Clase Persona
persona::persona()
{
int p=0;
establecerPersona(p);
} //Fin Constructor Persona
void persona::capturarPersona()
{
int id =0;
cout<<"Ingrese Identidad ? "<<endl;
cin>>id;
establecerPersona(id);
} //Fin Captura Persona
void persona::establecerPersona(int p)
{
Identidad=p;
} //Fin Establecer Persona
int persona::obtenerIdentidad()
{
return Identidad;
} //Fin Obtener Identidad
void persona::imprimirPersona()
{
cout<<"\n Identidad De Persona: "<<Identidad;
} //Fin Imprimir Persona
// Funciones Del CLase Estudiante
estudiante::estudiante()
{
int cuenta=0;
establecerEstudiante(cuenta);
} //Fin Estudiante
void estudiante::capturarEstudiante()
{
int Nro =0;
cout<<"Ingrese Numero De Cuenta ? "<<endl;
cin>>Nro;
establecerEstudiante(Nro);
} //Fin Capturar Estudiante
void estudiante::establecerEstudiante(int c)
{
nroCuenta=c;
} //Fin Establecer Estudiante
int estudiante::obtenerNroCuenta()
{
return nroCuenta;
} //Fin Obtener Numero De Cuenta
void estudiante::imprimirEstudiante()
{
cout<<"\n Numero De Cuenta Estudiante: "<<nroCuenta;
} //Fin Imprimir Estudiante
@Kevin-Gomez10
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment