Metziop

Untitled

Jul 27th, 2022
1,031
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.22 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Ubar4.Modelo
  8. {
  9.     public class Viaje
  10.     {
  11.         //atributos de la clase
  12.         private int idViaje;
  13.         private double origenLat;
  14.         private double origenLon;
  15.         private double destinoLat;
  16.         private double destinoLon;
  17.         private string fecha;//fecha del viaje
  18.         private string tiempo;//hora inicial
  19.         private double distancia;
  20.         private string tiempoEstimado;
  21.         private string horaLlegada;
  22.         private double costo;
  23.         private string direccion;
  24.         private int idUser;
  25.         //método constructor
  26.         public Viaje()
  27.         {
  28.             this.idViaje = 0;
  29.             this.origenLat = 0;
  30.             this.origenLat= 0;
  31.             this.destinoLat = 0;
  32.             this.destinoLon= 0;
  33.             this.fecha = "";
  34.             this.tiempo = "";
  35.             this.distancia = 0;
  36.             this.tiempoEstimado = "";
  37.             this.horaLlegada = "";
  38.             this.costo = 0;
  39.             this.direccion = "";
  40.             this.idUser = 0;
  41.  
  42.         }
  43.         //métodos de acceso (getters y setters)
  44.         public int IdViaje { get => idViaje; set => idViaje = value; }
  45.         public double OrigenLat { get => origenLat; set => origenLat = value; }
  46.         public double OrigenLon { get => origenLon; set => origenLon = value; }
  47.         public double DestinoLat { get => destinoLat; set => destinoLat = value; }
  48.         public double DestinoLon { get => destinoLon; set => destinoLon = value; }
  49.         public string Fecha { get => fecha; set => fecha = value; }
  50.         public string Tiempo { get => tiempo; set => tiempo = value; }
  51.         public double Distancia { get => distancia; set => distancia = value; }
  52.         public string TiempoEstimado { get => tiempoEstimado; set => tiempoEstimado = value; }
  53.         public string HoraLlegada { get => horaLlegada; set => horaLlegada = value; }
  54.         public double Costo { get => costo; set => costo = value; }
  55.         public string Direccion { get => direccion; set => direccion = value; }
  56.         public int IdUser { get => idUser; set => idUser = value; }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment