Advertisement
GatoBooster

Venta

Mar 19th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1. public class Venta {
  2.     private String producto;
  3.     private String fecha; //aammdd
  4.     private int total;
  5.    
  6.     public Venta(String a, String b, int c){
  7.         this.producto = a;
  8.         this.fecha = b;
  9.         this.total = c;
  10.     }
  11.    
  12.     public String getProducto(){
  13.         return producto;
  14.     }
  15.     public void setProducto(String producto){
  16.         this.producto = producto;
  17.     }
  18.    
  19.     public String getFecha(){
  20.         return fecha;
  21.     }
  22.     public void setFecha(String fecha){
  23.         this.fecha = fecha;
  24.     }
  25.    
  26.     public int getTotal(){
  27.         return total;
  28.     }
  29.     public void setTotal(int total){
  30.         this.total = total;
  31.     }
  32.    
  33.     public static void main(String args[]) {
  34.         Venta carro[] = new Venta[100];
  35.         String auxProducto, auxFecha;
  36.         int auxTotal;
  37.        
  38.         auxProducto = "Manzana";
  39.         auxFecha = "190319";
  40.         auxTotal = 500;
  41. /*     
  42.         carro[0].producto = auxProducto;
  43.         carro[0].fecha = auxFecha;
  44.         carro[0].total = auxTotal;
  45. */
  46.        
  47.        
  48.         System.out.println("HOOOOLA");
  49.     //  System.out.println("ALO: "+carro[0].producto);
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement