forked from ramram43210/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.java
More file actions
25 lines (19 loc) · 828 Bytes
/
Copy pathClient.java
File metadata and controls
25 lines (19 loc) · 828 Bytes
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
public class Client
{
public static void main( String[] args )
{
new Client().folderAccess();
}
private void folderAccess()
{
System.out.println(this.getClass()+" : Client passing user with designation 'CEO' to folderproxy");
User john = new User("John", "John123","CEO");
FolderProxy folderProxy = new FolderProxy(john);
folderProxy.performReadOrWriteOperations();
System.out.println("\n***************************************************************************************\n");
System.out.println(this.getClass()+" : Client passing user with designation 'Developer' to folderproxy");
User raj = new User("Raj", "Raj123","Developer");
FolderProxy folderProxyWrong = new FolderProxy(raj);
folderProxyWrong.performReadOrWriteOperations();
}
}