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 predo ( 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 nomeTemp ){
this-> serie= serieTemp
}
void Aluno::setGrau( string nomeTemp ){
this-> Grau= grauTemp
}
void Aluno::setContato( string nomeTemp ){
this -> Contato = contatoTemp
}
int main ( int argc, char **argv){
Contato contato1;
string nomeTemp
string serieTemp
string grauTemp
string contatoTemp
cout << "entre com o nome do aluno: " ;
getline(cin, nomeTemp );
cout << "entre com o nome do aluno: " ;
getline(cin, serieTemp );
cout << "entre com o nome do aluno: " ;
getline(cin, grauTemp );
cout << "entre com o nome do aluno: " ;
getline(cin, contatoTemp );
cout<<endl;
contato1.setNome(nomeTemp );
contato1.setSerie( serieTemp);
contato1.setGrau( grauTemp);
contato1.setContato( contatoTemp);
cibtati1.showContato();
return 0;
}
Revise this Paste