Se vc fizer uma classe q herda de pessoa, vamos dizer, bombeiro, e bombeiros só podem ser homens, vc pode fazer outro construtor somente com nome e idade. O sexo seria masculino por default, entendeu?
[s] ttc 2010/4/8 Daniel Daim <[email protected]> > Peter, > > eu criei um construtor com nome, idade e sexo para um novo objeto da classe > pessoa, já que essas são minha variáveis de instância. > Não entendi o fundamento de criar um outro construtor. Entendeu? > > -- > You received this message because you are subscribed to the Google Groups > "Comp 2 - Geral" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<comp2-geral%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/comp2-geral?hl=en. > -- You received this message because you are subscribed to the Google Groups "Comp 2 - Geral" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/comp2-geral?hl=en.
