Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.68 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 Projeto_motass
  8. {
  9.     class motas
  10.     {
  11.        
  12.  
  13.         private string _matricula;
  14.  
  15.         public string matricula
  16.         {
  17.             get
  18.             {
  19.                 return _matricula;
  20.             }
  21.             set
  22.             {
  23.                 _matricula = value;
  24.             }
  25.         }
  26.  
  27.  
  28.         private string _nome_piloto;
  29.  
  30.         public string nome_piloto
  31.         {
  32.             get
  33.             {
  34.                 return _nome_piloto;
  35.             }
  36.  
  37.             set
  38.             {
  39.                 _nome_piloto = value;
  40.             }
  41.  
  42.         }
  43.  
  44.  
  45.         private string _modelo;
  46.  
  47.         public string modelo
  48.         {
  49.             get
  50.             {
  51.                 return _modelo;
  52.             }
  53.  
  54.             set
  55.             {
  56.                 _modelo = value;
  57.             }
  58.         }
  59.  
  60.  
  61.         private int _cilindrada;
  62.  
  63.         public int cilindrada
  64.         {
  65.             get
  66.             {
  67.                 return _cilindrada;
  68.             }
  69.  
  70.             set
  71.             {
  72.                 _cilindrada = value;
  73.             }
  74.  
  75.         }
  76.  
  77.  
  78.         private int _velocidade;
  79.  
  80.         public int Velocidade
  81.         {
  82.             get
  83.             {
  84.                 return _velocidade;
  85.             }
  86.  
  87.             set
  88.             {
  89.                 _velocidade = value;
  90.             }
  91.  
  92.         }
  93.  
  94.  
  95.         public void Acelerar(int vel)
  96.         {
  97.  
  98.             _velocidade += vel;
  99.  
  100.         }
  101.         public void Travar(int vel)
  102.         {
  103.  
  104.             _velocidade -= vel;
  105.  
  106.         }
  107.     }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement