Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package otropaquete;
- public class CD extends Elemento
- {
- private String artista;
- private String interprete;
- private int cantCanciones;
- public CD()
- {
- super();
- interprete = " ";
- cantCanciones = 0;
- }
- public CD(String titulo, double duracion, boolean loTengo, String comentario, String interprete, int cantCanciones, String nacionalidad, int calidad, String formato, boolean esOriginal, String idioma, String genero, int año, double costo, int estado, String distribuidor, String artista)
- {
- super(titulo ,duracion ,loTengo ,comentario, nacionalidad, calidad, formato, esOriginal, idioma, genero, año, costo, estado, distribuidor);
- this.interprete = interprete;
- this.cantCanciones = cantCanciones;
- this.artista = artista;
- }
- public void setArtista(String artista)
- {
- this.artista = artista;
- }
- public String getArtista()
- {
- return artista;
- }
- public void setInterprete(String interprete)
- {
- this.interprete = interprete;
- }
- public String getInterprete()
- {
- return interprete;
- }
- public void setCantCanciones(int cantCanciones)
- {
- this.cantCanciones = cantCanciones;
- }
- public void metodoHija()
- {
- }
- @Override
- public String imprimir()
- {
- return "SOY UN CD ";//+super.imprimir();//+super.imprimir();
- }
- /*
- @Override
- public String toString() {
- // TODO Auto-generated method stub
- return super.toString()+" SOY CD";
- }
- */
- }
Add Comment
Please, Sign In to add comment