Concept explainers
Please solve the following in Java
Access Level
-
In many computer systems and networks, different users are granted different levels of access to different resources. In this case, you are given a int[] rights, indicating the privilege level of each user to use some system resource. You are also given a int minPermission, which is the minimum permission a user must have to use this resource.
-
YouaretoreturnaStringindicatingwhichuserscanand cannot access this resource. Each character in the return value corresponds to the element of users with the same index. 'A' indicates the user is allowed access, while 'D' indicates the user is denied access.
Constraints
-
users will contain between 0 and 50 elements, inclusive.
-
Each element of users will be between 0 and 100, inclusive.
-
minPermission will be between 0 and 100, inclusive.
Examples
-
a) {0,1,2,3,4,5} 2
Returns: "DDAAAA" Here, the first two users don't have sufficient privileges, but the remainder do.
-
b) {5,3,2,10,0} 20
Returns: "DDDDD" Unfortunately, nobody has sufficient access.
-
c) {}
20
Returns: "" It makes no difference what permission is required, since there are no users to check.
d) {34,78,9,52,11,1} 49
Returns: "DADADD"Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
- Java Inheritance problem Hi everyone, I've trouble understanding and efficiently finishing this assignment. In this assignment we are required to populate 20*15 scores for 20 students. I can only do it manually, can anyone help to tell me a much better way to solve it?arrow_forwardNote: Writes Program in jAva Language you will implement a distributed resource-management scheme using Akka actors. Generally speaking, resources are anything that a system may use to fulfill the tasks that its users ask of it. Disk drives are resources, as are printers and scanners; memory and cores can also be viewed as resources, as can database controllers and more exotic devices such as motion sensors, bar code readers, and webcams. In a distributed system, one often wants to share these resources with all nodes in the network.Conceptually, the system you will be building consists of a collection of computing nodes (think “machines on a network”) that can communicate via message passing. Each node owns a collection of local resources that it is willing to share with other nodes in the network. To manage this sharing, each node includes a Resource Manager, which is responsible for controlling access to the resources it owns. Users, which are also running on the system nodes,…arrow_forwardTask 1: Coding HW_Methods.java 1. Create two programs, A and B, as described in the Specifications section. The basic purpose ofeach program is to outputs two distinct levels (or boards) from a Mario game. 2. Put both programs into one Java file to submit named the HW_Methods.java . To do this, eachprogram will be called as a method in the same class as your program; your main method will callthese two methods: public static void main(String[] args){ runProgramA(); runProgramB();} Note: Remember that your public class that is in that file must also be named HW_Methods .arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education