-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmartphone.java
More file actions
36 lines (31 loc) · 1.03 KB
/
Smartphone.java
File metadata and controls
36 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package lojaeletronicos;
public class Smartphone extends Produtos {
private static final long serialVersionUID = 1L;
private int chips;
public Smartphone(String marca, String modelo, int tela, int chips) {
super(marca, modelo, tela);
this.categoria = "Smartphone";
this.chips = chips;
}
@Override
public String toString() {
return "\n======" + getCategoria() + "======" +
"\nMarca: " + getMarca() +
"\nModelo: " + getModelo() +
"\nTela: " + getTela() + " polegadas" +
"\nQuantidade de chips: " + getChips() +
"\n" + funcionalidades();
}
@Override
public String funcionalidades() {
return "Funções do " + getCategoria() + ":" +
"\n- Fazer ligações" +
"\n- Mensagens de Texto" +
"\n- Ouvir músicas" +
"\n- Apps e Redes Sociais" +
"\n- Games";
}
public int getChips() {
return chips;
}
}