Skip to content

Instantly share code, notes, and snippets.

@httpmurilo
Created June 8, 2022 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save httpmurilo/3a8c57e337a7fa615f206c55e6ba05bb to your computer and use it in GitHub Desktop.
Save httpmurilo/3a8c57e337a7fa615f206c55e6ba05bb to your computer and use it in GitHub Desktop.
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