-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSocialMedia.java
More file actions
41 lines (32 loc) · 1.21 KB
/
Copy pathSocialMedia.java
File metadata and controls
41 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
*/
package socialmedia;
/**
*
* @author alizeidillazyuksel
*/
import java.util.*;
public class SocialMedia {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Date birthday = new Date();
User u1 = new User("Dolce" , "ldld" , birthday , "valerie@gmail.com" , "dwdwffs");
System.out.println(u1.getName());
User u2 = new User("Lani" , "" , birthday , "hardtimes@gmail.com" , "dwdwffs");
u1.AddFollower(u2); //u2 follows u1
System.out.println(u2.getName() + " has followed " + u1.getName());
u2.follow(u1); //u1 follows u2 back
System.out.println(u1.getName() + " has followed " + u2.getName());
u1.sendMessage("Bu bir mesajdir." , u2);
u2.sendMessage("GOTCHA", u1);
u1.showMessagefromOutbox(0);
u2.showMessagefromInbox(0);
u2.showMessagefromOutbox(0);
u1.showMessagefromInbox(0);
}
}