Uma empresa quer manter o registro da vida acadêmica de todos os seus funcionários, de modo que o modelo deve contemplar o registro das seguintes informações, de forma incremental:
Apresente a implementação, na linguagem de programação Java, da solução do problema apresentado, considerando os conceitos de encapsulamento, herança e polimorfismo do paradigmas de programação orientada a objetos.
/*************************************************************************
* Copyright (C) 2009/2025 - Cristiano Lehrer (cristiano@ybadoo.com.br) *
* Ybadoo - Solucoes em Software Livre (ybadoo.com.br) *
* *
* Permission is granted to copy, distribute and/or modify this document *
* under the terms of the GNU Free Documentation License, Version 1.3 or *
* any later version published by the Free Software Foundation; with no *
* Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A *
* A copy of the license is included in the section entitled "GNU Free *
* Documentation License". *
* *
* Ubuntu 16.10 (GNU/Linux 4.8.0-39-generic) *
* OpenJDK Version "1.8.0_121" *
* OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode) *
*************************************************************************/
package com.ybadoo.tutoriais.poo.tutorial04.exercicio09;
/**
* Funcionario que nao estudo
*/
public class SemEnsino
{
/**
* Codigo funcional
*/
private String codigo;
/**
* Nome do funcionario
*/
private String nome;
/**
* Retornar o codigo funcional
*
* @return codigo funcional
*/
public String getCodigo()
{
return codigo;
}
/**
* Configurar o codigo funcional
*
* @param codigo codigo funcional
*/
public void setCodigo(String codigo)
{
this.codigo = codigo;
}
/**
* Retornar o nome do funcionario
*
* @return nome do funcionario
*/
public String getNome()
{
return nome;
}
/**
* Configurar o nome do funcionario
*
* @param nome nome do funcionario
*/
public void setNome(String nome)
{
this.nome = nome;
}
}
/*************************************************************************
* Copyright (C) 2009/2025 - Cristiano Lehrer (cristiano@ybadoo.com.br) *
* Ybadoo - Solucoes em Software Livre (ybadoo.com.br) *
* *
* Permission is granted to copy, distribute and/or modify this document *
* under the terms of the GNU Free Documentation License, Version 1.3 or *
* any later version published by the Free Software Foundation; with no *
* Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A *
* A copy of the license is included in the section entitled "GNU Free *
* Documentation License". *
* *
* Ubuntu 16.10 (GNU/Linux 4.8.0-39-generic) *
* OpenJDK Version "1.8.0_121" *
* OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode) *
*************************************************************************/
package com.ybadoo.tutoriais.poo.tutorial04.exercicio09;
/**
* Funcionario que concluiu o ensino basico
*/
public class EnsinoBasico extends SemEnsino
{
/**
* Escola do ensino basico
*/
private String escolaBasica;
/**
* Retornar a escola do ensino basico
*
* @return escola do ensino basico
*/
public String getEscolaBasica()
{
return escolaBasica;
}
/**
* Configurar a escola do ensino basico
*
* @param escolaBasica escola do ensino basico
*/
public void setEscolaBasica(String escolaBasica)
{
this.escolaBasica = escolaBasica;
}
}
/*************************************************************************
* Copyright (C) 2009/2025 - Cristiano Lehrer (cristiano@ybadoo.com.br) *
* Ybadoo - Solucoes em Software Livre (ybadoo.com.br) *
* *
* Permission is granted to copy, distribute and/or modify this document *
* under the terms of the GNU Free Documentation License, Version 1.3 or *
* any later version published by the Free Software Foundation; with no *
* Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A *
* A copy of the license is included in the section entitled "GNU Free *
* Documentation License". *
* *
* Ubuntu 16.10 (GNU/Linux 4.8.0-39-generic) *
* OpenJDK Version "1.8.0_121" *
* OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode) *
*************************************************************************/
package com.ybadoo.tutoriais.poo.tutorial04.exercicio09;
/**
* Funcionario que concluiu o ensino medio
*/
public class EnsinoMedio extends EnsinoBasico
{
/**
* Escola do ensino medio
*/
private String escolaMedia;
/**
* Retornar a escola do ensino medio
*
* @return escola do ensino medio
*/
public String getEscolaMedia()
{
return escolaMedia;
}
/**
* Configurar a escola do ensino medio
*
* @param escolaMedia escola do ensino medio
*/
public void setEscolaMedia(String escolaMedia)
{
this.escolaMedia = escolaMedia;
}
}
/*************************************************************************
* Copyright (C) 2009/2025 - Cristiano Lehrer (cristiano@ybadoo.com.br) *
* Ybadoo - Solucoes em Software Livre (ybadoo.com.br) *
* *
* Permission is granted to copy, distribute and/or modify this document *
* under the terms of the GNU Free Documentation License, Version 1.3 or *
* any later version published by the Free Software Foundation; with no *
* Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A *
* A copy of the license is included in the section entitled "GNU Free *
* Documentation License". *
* *
* Ubuntu 16.10 (GNU/Linux 4.8.0-39-generic) *
* OpenJDK Version "1.8.0_121" *
* OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode) *
*************************************************************************/
package com.ybadoo.tutoriais.poo.tutorial04.exercicio09;
/**
* Funcionario que concluiu o ensino superior
*/
public class EnsinoSuperior extends EnsinoMedio
{
/**
* Universidade onde concluiu o ensino superior
*/
private String universidade;
/**
* Retornar a universidade onde concluiu o ensino superior
*
* @return universidade onde concluiu o ensino superior
*/
public String getUniversidade()
{
return universidade;
}
/**
* Configurar a universidade onde concluiu o ensino superior
*
* @param universidade universidade onde concluiu o ensino superior
*/
public void setUniversidade(String universidade)
{
this.universidade = universidade;
}
}