Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Practico1;
- import java.util.ArrayList;
- import java.util.Arrays;
- public class Libros {
- private String titulo;
- private ArrayList<String> autores;
- private String editorial;
- private int añoDePublicacion;
- private float precio;
- private String genero;
- public Libros() {
- }
- public Libros (String titulo, ArrayList<String> autores, String editorial, int añoDePublicacion, float precio, String genero){
- this.titulo = titulo;
- this.autores = autores;
- this.editorial = editorial;
- this.añoDePublicacion = añoDePublicacion;
- this.precio = precio;
- }
- @Override
- public String toString(){
- return ("\nTITULO:............."+getTitulo()
- +"\nAUTOR:.............."+getAutores()
- +"\nEDITORIAL:.........."+getEditorial()
- +"\nAÑO DE PUBLICACION:."+getAñoDePublicacion()
- +"\nPRECIO:............$"+getPrecio()
- +"\nGENERO:............."+getGenero());
- }
- //Getter-Setter
- public String getTitulo() {
- return titulo;
- }
- public void setTitulo(String titulo) {
- this.titulo = titulo;
- }
- public ArrayList<String> getAutores() {
- return autores;
- }
- public void setAutores(ArrayList<String> autor) {
- this.autores = autor;
- }
- public String getEditorial() {
- return editorial;
- }
- public void setEditorial(String editorial) {
- this.editorial = editorial;
- }
- public int getAñoDePublicacion() {
- return añoDePublicacion;
- }
- public void setAñoDePublicacion(int anio) {
- this.añoDePublicacion = anio;
- }
- public float getPrecio() {
- return precio;
- }
- public void setPrecio(float precio) {
- this.precio = precio;
- }
- public String getGenero() {
- return genero;
- }
- public void setGenero(String string) {
- this.genero = string;
- }
- public static int size() {
- // TODO Auto-generated method stub
- return 0;
- }
- public static Object get(int i) {
- // TODO Auto-generated method stub
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment