Advertisement
soxa

Batery

Feb 3rd, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.19 KB | None | 0 0
  1. //model, hours idle and hours talk
  2.  
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8.  
  9. namespace GSM
  10. {
  11.     internal class Battery
  12.     {
  13.         private string model = null;
  14.         private int hoursIdle = 0;
  15.         private int hoursTalk = 0;
  16.  
  17.         public Battery(string batteryModel, int hoursIdle, int hoursTalk)
  18.         {
  19.             this.model = batteryModel;
  20.             this.hoursIdle = hoursIdle;
  21.             this.hoursTalk = hoursTalk;
  22.         }
  23.         public Battery()
  24.         {
  25.  
  26.         }
  27.  
  28.         public string Model
  29.         {
  30.             get { return this.model; }
  31.             set { this.model = value; }
  32.         }
  33.  
  34.         public int HoursIdle
  35.         {
  36.             get { return this.hoursIdle; }
  37.             set { this.hoursIdle = value; }
  38.         }
  39.  
  40.         public int HoursTalk
  41.         {
  42.             get { return this.hoursTalk; }
  43.             set { this.hoursTalk = value; }
  44.         }
  45.  
  46.         public int AddHoursIdle()
  47.         {
  48.             return this.hoursIdle++;
  49.         }
  50.  
  51.         public int AddHoursTalk()
  52.         {
  53.             return this.hoursTalk++;
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement