Laptop - return "La Laptop de marca...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class Laptop extends Computadora{ p private double pila; p public Laptop(){ super(); pila = 1;} p public Laptop(String m, int r, double d, int p){ //super(m, r, d);} // No marca error por que es tipo público. setMarca(m); setRam(r); setDisco(d); pila = p;} p public double getPila(){ return pila;} r public void setPila(double p){ pila = p;} p public String toString(){// Éste método sobreescribe el método del papá
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return "La Laptop de marca "+getMarca()+" con RAM de "+getRam()+" Gb. y con disco duro de "+getDisco()+" Gb. de almacenamiento. La duración de la pila es de "+pila+"hr(s).";} // Forma Opcional. return super.toString()+" La batería tiene una duración de "+pila+"hr(s).";} }...
View Full Document

This note was uploaded on 10/29/2009 for the course ITC TC-1002 taught by Professor X during the Spring '09 term at ITESM.

Ask a homework question - tutors are online