Metziop

Untitled

Jun 12th, 2022
935
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 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 planetum
  8. {
  9.     public class Planeta
  10.     {
  11.        private string name;
  12.        private double costoIda,costoVuelta,costoNoche;
  13.        private bool itsHostile;
  14.         private string descripcion;
  15.  
  16.         //constructor
  17.         public Planeta(string name, double costoIda, double costoVuelta, double costoNoche, bool itsHostile, string descripcion)
  18.         {
  19.             this.Name = name;
  20.             this.CostoIda = costoIda;
  21.             this.CostoVuelta = costoVuelta;
  22.             this.CostoNoche = costoNoche;
  23.             this.ItsHostile = itsHostile;
  24.             this.descripcion = descripcion;
  25.         }
  26.         //getters y setters
  27.         public string Name { get => name; set => name = value; }
  28.         public double CostoIda { get => costoIda; set => costoIda = value; }
  29.         public double CostoVuelta { get => costoVuelta; set => costoVuelta = value; }
  30.         public double CostoNoche { get => costoNoche; set => costoNoche = value; }
  31.         public bool ItsHostile { get => itsHostile; set => itsHostile = value; }
  32.         public string Descripcion { get => descripcion; set => descripcion = value; }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment