Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C++ by pemlk ( 15 years ago )
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
using std::string;
class  Aluno{
private: 
 string Nome;
 string Serie;
 string Grau;
 string Contato;
public: 
 void showAluno( );
 void setNome (string nomeTemp );
 void setSerie(string serieTemp);
 void setGrau (string grauTemp );
 void setContato(string contatoTemp);
};

void Aluno::showAluno( ){
   cout << "nome do aluno"<< Nome << endl
  << "Serie do aluno" << Serie<<endl
  << "Tipo de ensino" << Grau <<endl
  << "contato do responsavel"<<Contato<<endl; 
}

void Aluno::setNome( string nomeTemp ){
 this-> Nome = nomeTemp
}
void Aluno::setSerie( string serieTemp ){
 this-> serie= serieTemp
}
void Aluno::setGrau( string grauTemp ){
 this-> Grau= grauTemp
}
void Aluno::setContato( string contatoTemp ){
 this -> Contato = contatoTemp
}


int main ( int argc, char **argv){
 Aluno aluno1;
 string nomeTemp
 string serieTemp
 string grauTemp
 string contatoTemp
 cout << "entre com o nome do aluno: " ;
 getline(cin, nomeTemp );
 cout << "entre com a serie do aluno: " ;
 getline(cin, serieTemp );
 cout << "entre com o grau do aluno: " ;
 getline(cin, grauTemp );
 cout << "entre com o contato do aluno: " ;
 getline(cin, contatoTemp );
 
 cout<<endl;
 
 aluno1.setNome(nomeTemp );
 aluno1.setSerie( serieTemp);
 aluno1.setGrau( grauTemp);
 aluno1.setContato( contatoTemp);
 aluno1.showAluno();
return 0;
}

 

Revise this Paste

Parent: 41277
Your Name: Code Language: