Created
June 8, 2022 00:49
-
-
Save httpmurilo/3a8c57e337a7fa615f206c55e6ba05bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.escola.entidade; | |
public class Aluno { | |
public static Aluno criarAlunoComDivisaoPadrao(String nome, Integer idade, String cidade, double notaDeCorte){ | |
return new AlunoSM(nome, idade, cidade, notaDeCorte, 4); | |
} | |
//tradicional | |
private Aluno(String nome, Integer idade, String cidade, double notaDeCorte, Integer dividirPor) { | |
this.nome = nome; | |
this.idade = idade; | |
this.cidade = cidade; | |
this.notaDeCorte = notaDeCorte; | |
this.dividirPor = dividirPor; | |
} | |
//getters e setters |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment