gonzalob

Untitled

Apr 8th, 2020
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.44 KB | None | 0 0
  1. package otropaquete;
  2.  
  3. public class CD extends Elemento
  4. {
  5.     private String artista;
  6.     private String interprete;
  7.     private int cantCanciones;
  8.    
  9.     public CD()
  10.     {
  11.         super();
  12.         interprete = " ";
  13.         cantCanciones = 0;
  14.     }
  15.    
  16.     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)
  17.     {
  18.         super(titulo ,duracion ,loTengo ,comentario, nacionalidad, calidad, formato, esOriginal, idioma, genero, año, costo, estado, distribuidor);
  19.         this.interprete = interprete;
  20.         this.cantCanciones = cantCanciones;
  21.         this.artista = artista;
  22.     }
  23.    
  24.     public void setArtista(String artista)
  25.     {
  26.         this.artista = artista;
  27.     }
  28.    
  29.     public String getArtista()
  30.     {
  31.         return artista;
  32.     }
  33.    
  34.     public void setInterprete(String interprete)
  35.     {
  36.         this.interprete = interprete;
  37.     }
  38.    
  39.     public String getInterprete()
  40.     {
  41.         return interprete;
  42.     }
  43.    
  44.     public void setCantCanciones(int cantCanciones)
  45.     {
  46.         this.cantCanciones = cantCanciones;
  47.     }
  48.    
  49.     public void metodoHija()
  50.     {
  51.        
  52.     }
  53.    
  54.    
  55.    
  56.     @Override
  57.     public String imprimir()
  58.     {
  59.         return "SOY UN CD ";//+super.imprimir();//+super.imprimir();
  60.     }
  61.    
  62.    
  63.    
  64.    
  65.     /*
  66.     @Override
  67.     public String toString() {
  68.         // TODO Auto-generated method stub
  69.         return super.toString()+" SOY CD";
  70.     }
  71.     */
  72.    
  73. }
Add Comment
Please, Sign In to add comment