-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTelevisor.js
More file actions
33 lines (30 loc) · 821 Bytes
/
Televisor.js
File metadata and controls
33 lines (30 loc) · 821 Bytes
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
import {Electrodomestico} from './Electrodomestico.js'
export class Televisor extends Electrodomestico{
constructor(consumo, procedencia,tamaño,sintonidorTDT){
super(consumo, procedencia)
this.tamaño=tamaño
this.sintonidorTDT=sintonidorTDT
}
getincreTamaño(){
if(this.tamaño>40){
return super.calcPrecioBase()*0.3
}
else{
return 0
}
}
getincreSintonizador(){
if(this.sintonidorTDT){
return 250000
}
else{
return 0
}
}
preciofinal(){
return super.calcPrecioBase()+this.getincreTamaño()+this.getincreSintonizador()
}
leer(){
return super.leer()+", tamaño: "+this.tamaño+", tiene sintoniador: "+this.sintonidorTDT
}
}