static void Main(string[] args)
        {
            Facebook fb = new Facebook(25);
            Twitter  tw = new Twitter("Merry Christmas", 800);
            Person   p  = new Person("Alice", fb, tw);

            Console.WriteLine(p);

            fb.setnumFriends(50);

            tw.setlastTweet("Happy New Year");
            Console.WriteLine(p);
            p.gettwAccount().setlastTweet("Happy Holidays");
            Console.WriteLine(p);

            fb.addFriend();
            Console.WriteLine(p);
            Console.ReadKey();
        }
Beispiel #2
0
 public void settwAccount(Twitter newtwAccount)
 {
     twAccount = newtwAccount;
 }
Beispiel #3
0
 public Person(string name, Facebook fbAccount, Twitter twAccount)
 {
     this.name      = name;
     this.fbAccount = fbAccount;
     this.twAccount = twAccount;
 }