-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desafio atualizado #4
base: main
Are you sure you want to change the base?
Changes from 1 commit
2c42dfc
c159a70
5c5915b
9e3e75a
3de67d8
64b1369
5f7aad2
5b99054
766bb1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ | |
public class Bebida { | ||
private int id; | ||
private String nome; | ||
Receitas receita; | ||
Receita receita; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
private double preco; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. legal usar a classe BigDecimal do Java para valores que precisam de precisão decimal, como monetários |
||
private static ArrayList<Bebida> menu = new ArrayList<Bebida>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pq a bebida tem um Menu? Consegue pensar em outra classe que representaria melhor essa relação tem um menu? |
||
|
||
public Bebida(){ | ||
|
||
} | ||
|
||
public Bebida(int id, String nome, Receitas receita, double preco) { | ||
public Bebida(int id, String nome, Receita receita, double preco) { | ||
this.id = id; | ||
this.nome = nome; | ||
this.receita = receita; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui vc tbm pode usar a interface List como retorno, assim se amanhã vc precisar mudar a implementação de ArrayList para outro tipo de List, só precisará mudar em um lugar