Share Pastebin
Guest
Public paste!

Classe Nota

By: a guest | Mar 21st, 2010 | Syntax: C# | Size: 0.81 KB | Hits: 67 | Expires: Never
Copy text to clipboard
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace Escola
  7. {
  8.     class Nota
  9.     {
  10.         private double b1;
  11.         private double b2;
  12.         private double b3;
  13.         private double b4;
  14.  
  15.  
  16.         public double B1
  17.         {
  18.             get { return b1; }
  19.             set { b1 = value; }
  20.         }
  21.  
  22.         public double B2
  23.         {
  24.             get { return b2; }
  25.             set { b2 = value; }
  26.         }
  27.  
  28.         public double B3
  29.         {
  30.             get { return b3; }
  31.             set { b3 = value; }
  32.         }
  33.  
  34.         public double B4
  35.         {
  36.             get { return b4; }
  37.             set { b4 = value; }
  38.         }
  39.  
  40.  
  41.         public double calcularMedia()
  42.         {
  43.             return (b1 + b2 + b3 + b4) / 4;
  44.  
  45.         }
  46.     }
  47. }