bouchnina

class salarie

Mar 4th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. /*
  2. Aimez La page sur Facebook
  3. Page Name : Langage C
  4. Page Link : www.facebook.com/MOBY.c00
  5. */
  6.  
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11.  
  12. namespace pageFace
  13. {
  14.     class Salarie
  15.     {
  16.         static private int nbrSalarie = 0;
  17.  
  18.     public static int NbrSalarie
  19.     {
  20.       get { return Salarie.nbrSalarie; }
  21.     }
  22.        
  23.         private int matricule;
  24.         private char statut;
  25.         private string service;
  26.         private string nom;
  27.         private double salaire;
  28.  
  29.         public Salarie()
  30.         {
  31.             nbrSalarie++;
  32.         }
  33.  
  34.         double CalculSalaire()
  35.         {
  36.             return this.salaire * 12;
  37.         }
  38.  
  39.         void Affichage()
  40.         {
  41.             Console.WriteLine("nom : " + this.nom + "\tmatricule : " + this.matricule + "\tservice : " + this.service);
  42.             Console.WriteLine("status : " + this.statut + "\tsalaire : " + this.salaire);
  43.         }
  44.  
  45.  
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment