Advertisement
svetoslavbozov

OOP.1.1 MobilePhoneDevice

Feb 20th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.42 KB | None | 0 0
  1. public class GSM
  2. {
  3.     Display gsmDisplay = new Display();
  4.     Battery gsmBattery = new Battery();
  5.  
  6.     private string model;
  7.     private string manufacturer;
  8.     private int price;
  9.     private string owner;
  10.  
  11.     public string Model
  12.     {
  13.         get { return this.model; }
  14.         set { this.model = value; }
  15.     }
  16.     public string Manufacturer
  17.     {
  18.         get { return this.manufacturer; }
  19.         set { this.manufacturer = value; }
  20.     }
  21.     public int Price
  22.     {
  23.         get { return this.price; }
  24.         set { this.price = value; }
  25.     }
  26.     public string Owner
  27.     {
  28.         get { return this.owner; }
  29.         set { this.owner = value; }
  30.     }
  31. }
  32.  
  33. public class Display
  34. {
  35.     private int size;
  36.     private int colors;
  37.  
  38.     public int Size
  39.     {
  40.         get { return this.size; }
  41.         set { this.size = value; }
  42.     }
  43.     public int Colors
  44.     {
  45.         get { return this.colors; }
  46.         set { this.colors = value; }
  47.     }
  48. }
  49.  
  50. public class Battery
  51. {
  52.     private string model;
  53.     private int hoursIdle;
  54.     private int hoursTalk;
  55.  
  56.     public string Model
  57.     {
  58.         get { return this.model; }
  59.         set { this.model = value; }
  60.     }
  61.     public int HoursIdle
  62.     {
  63.         get { return this.hoursIdle; }
  64.         set { this.hoursIdle = value; }
  65.     }
  66.     public int HoursTalk
  67.     {
  68.         get { return this.hoursTalk; }
  69.         set { this.hoursTalk = value; }
  70.     }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement