Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package matheusediogo;
- import java.util.Scanner;
- public class Docente extends Pessoa{
- private String siape;
- private String titulo;
- private int carga;
- private int tipo;
- private String cpf;
- private int verifica;
- @Override
- public void resetarContador(int docente){
- super.resetarContador(docente);
- }
- public void cadastrarDocente(int docente, String c){
- verifica = docente;
- super.cadastrarPessoa(c, docente);
- if(verifica == docente){
- cpf = super.getCpf();
- Scanner ler = new Scanner(System.in);
- System.out.printf("Titulação: ");
- this.titulo = ler.nextLine();
- System.out.printf("Carga Horária: ");
- this.carga = ler.nextInt();
- System.out.printf("Tipo de Docente: ");
- this.tipo = ler.nextInt();
- ler.nextLine();
- System.out.printf("SIAPE: ");
- this.siape = ler.nextLine();
- if(this.siape.length() != 7) {
- resetarContador(docente);
- }
- else if(this.carga < 0 || this.carga > 40){
- resetarContador(docente);
- }
- }
- }
- public void imprimir(){
- super.imprimir();
- System.out.println("SIAPE: " +this.siape);
- if(this.tipo == 1){
- System.out.println("Docente Efetivo");
- }
- else if(this.tipo == 2){
- System.out.println("Docente Temporário");
- }
- System.out.println("Carga Horária: "+this.carga);
- if("me".equals(this.titulo)){
- System.out.println("Titulação: Mestre");
- }
- else if("gr".equals(this.titulo)){
- System.out.println("Titulação: Graduado");
- }
- else if("do".equals(this.titulo)){
- System.out.println("Titulação: Doutorado");
- }
- }
- public String getSiape(){
- return this.siape;
- }
- public int getTipo(){
- return this.tipo;
- }
- public String getTitulo(){
- return this.titulo;
- }
- @Override
- public String getCpf(){
- return this.cpf;
- }
- }
Add Comment
Please, Sign In to add comment