







Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!








class Estudiantes{ private : string nombre;
int nProfesores = 10; Profesores profesor[nProfesores]; Void main(){ Cout << “En proceso de creacion xd”; }
#include
cin>>opc; return opc; }while (opc != 4); } int main (){ cout << "Apertura de profesores" << endl; system("pause"); aperturaProfesor(); system("cls"); cout << "Apertura del alumnos"<< endl; system("pause"); aperturaEstudiante(); system("cls"); cout << "Apertura de las materias"<< endl; system("pause"); aperturaMateria(); system("cls"); int menu; system("cls"); do { cout << "Que desea visualizar?" << endl ; cout << "1.Estudiante" << endl << "2.Profesor"<< endl << "3.Materia" << endl << "4.Salir" << endl; cout << "Opcion [ ]\b\b"; cin>>menu; switch (menu){ case 1: reporteEstudiante(); break; case 2: reporteProfesor(); break; case 3: reporteMateria(); break; } }while(menu != 4); }
int creditos; string profesor; public: Materia(string,int,string); void setNombre(string); void setCreditos(int); void setProfesor(string); string getNombre(); int getCreditos(); string getProfesor(); }; void aperturaMateria(); void reporteMateria(); Materia::Materia(string nombre,int creditos,string profesor){ this->nombre=nombre; this->creditos=creditos; this->profesor=profesor; } void Materia :: setNombre(string nombre){ this->nombre=nombre; } void Materia :: setCreditos(int creditos){ this->creditos=creditos; } void Materia :: setProfesor(string profesor){ this->profesor=profesor; } string Materia :: getNombre(){ return this-> nombre; } int Materia :: getCreditos(){ return this-> creditos; } string Materia :: getProfesor(){ return this->profesor; } vector
cout << endl << "Dame el nombre del profesor :"; cin >> profesor; listaMateria.push_back(Materia(nombre,creditos,profesor)); } } void reporteMateria(){ char op = 'S'; for(int i=0; i<listaMateria.size() ;i++){ string nombre,profesor; int creditos; cout << endl; cout << "Nombre: " <<listaMateria[i].getNombre() << endl; cout << "Creditos: " <<listaMateria[i].getCreditos() << endl; cout << "Profesor: " << listaMateria[i].getProfesor()<< endl; } #include
cout << endl << "Dame el sexo:" ; cin >> sexo; listaProfesores.push_back(Profesores(nombre,apellido,cedula,edad,sexo)); } } void reporteProfesor(){ system("cls"); char op = 'S'; for(int i=0; i<listaProfesores.size() ;i++){ cout << endl; cout << "Nombre: " <<listaProfesores[i].getNombre() << endl; cout << "Apellido: " <<listaProfesores[i].getApellido() << endl; cout << "Cedula: " << listaProfesores[i].getCedula()<< endl; cout << "Edad: " << listaProfesores[i].getEdad()<< endl; cout << "Sexo: " << listaProfesores[i].getSexo()<< endl; } } #include
int aperturaEstudiante(); void reporteEstudiante(); Estudiante::Estudiante(string nombre,string apellido,int numeroCuenta,int edad,char sexo,int semestre,string materia){ this->nombre=nombre; this->apellido=apellido; this->numeroCuenta=numeroCuenta; this->edad=edad; this->sexo=sexo; this->semestre=semestre; this->materia=materia; } void Estudiante :: setNombre(string nombre){ this->nombre=nombre; } void Estudiante :: setApellido(string apellido){ this->apellido=apellido; } void Estudiante :: setNumeroCuenta(int numeroCuenta){ this->numeroCuenta=numeroCuenta; } void Estudiante :: setEdad(int edad){ this->edad=edad; } void Estudiante :: setSexo(char sexo){ this->sexo=sexo; } void Estudiante :: setSemestre(int semestre){ this->semestre=semestre; } void Estudiante :: setMateria(string materia){ this->materia=materia; } string Estudiante :: getNombre(){ return this-> nombre; } string Estudiante :: getApellido(){ return this-> apellido; } int Estudiante :: getNumeroCuenta(){ return this->numeroCuenta; } int Estudiante :: getEdad(){ return this->edad;