The first line contains the number N the number of files contained in the filesystem. The following
Question:
The first line contains the number N the number of files contained in the filesystem. The following N lines contain the file names and allowed operations with them, separated by spaces. The next line contains an integer M the number of operations to the files. The last M lines specify the operations that are requested for files. One file can be requested many times.
You need to recover control over the access rights to the files. For each request, your program should return OK if the requested operation is valid or Access denied if the operation is invalid.
W = write, R = read, X = execute
Example input:
4 helloworld.exe R X pinglog W R nya R goodluck X W R 5 read nya write helloworld.exe execute nya read pinglog write pinglog
example output:
OK Access denied Access denied OK OK
Has to be done in Java and has to use Hashmaps.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill