Briefly explain the importance of implementing getters and setters rather than allowing direct modification of instance variables.
Blog
Fill in the four blanks so that randomValue has a random int…
Fill in the four blanks so that randomValue has a random integer value between 9 and 99, both ends inclusive. int randomValue = __1__ (__2__.random() * __3__) + __4__; Use this template for your answer (please type fully – you cannot copy): 1: [answer for blank 1] 2: [answer for blank 2] 3: [answer for blank 3] 4: [answer for blank 4]
Can we override private methods? If so, explain a scenario i…
Can we override private methods? If so, explain a scenario in which we would do so. If not, explain why.
Inheritance reduces the need to ______________ existing code…
Inheritance reduces the need to ______________ existing code. (select one)
Write the class header and the variable declarations (a clas…
Write the class header and the variable declarations (a class without constructors or methods, with correct syntax) for SpacePirate (a concrete class, child of Pirate). The class has the following variables: crewSize (int) spaceship (String)
[EXTRA CREDIT] Write an equals method for SpacePirate. Two i…
[EXTRA CREDIT] Write an equals method for SpacePirate. Two instances of SpacePirate are equal if their parent’s variables are equal and if they have the same crewSize and spaceship. You must use the parent’s equals method for credit.
Constructor chaining … (select one)
Constructor chaining … (select one)
Write a getter for bounty and pirateCount. Write a setter fo…
Write a getter for bounty and pirateCount. Write a setter for name and bounty.
A stimulus is detected by a receptor and the response is sal…
A stimulus is detected by a receptor and the response is salivation. How many synapses are involved in the reflex pathway? Assume the sensory neuron has a receptor membrane and that there is an integrating neuron.
These questions are from the discretionary and mandatory acc…
These questions are from the discretionary and mandatory access control modules. All students in a class belong to a group G and are able to access class resources because G is granted the necessary permissions. Assume Alice has tested out of a topic and does not need to take the quiz Q on this topic. The professor does not want Alice to have access to Q but wants Alice to remain in group G so she can access other resources. Also, the professor wants to grant access to Q to all other students by granting the desired access to G. The mechanisms provided by various operating systems can be used to meet this access control requirement. Explain how this can be achieved most efficiently and correctly in Linux with extended access control lists (EACLs) and in Windows. First, provide the access control entries (ACEs) for Alice and G with their types and permissions for the quiz Q in each system. After this, discuss which of these ACEs will be checked if Alice tries to gain access to the quiz Q and is denied access. (2+2+2+2 pts.) The Bell and La Padula (BLP) and Biba models address confidentiality and integrity of data in a system that supports mandatory access control. A system allows read-down as is done by BLP, and writes by a user are only allowed at the user’s level (no writes to higher levels are allowed). Does this system satisfy the confidentiality and integrity goals of the BLP and Biba models? First, describe the BLP and Biba requirements and then explain if the requirements of each model are satisfied. (2+2+2+2 pts.) A certain company has many customers and some of them have conflict-of-interest (CoI) relationships. Also, employees can only access company data by executing applications approved by the company based on the functions they perform in the company. The people responsible for access provisioning in this company came up with the following scheme. All files of a given customer must be stored in a single directory (it could be a container-like unit when using cloud storage). Initially, users are allowed to execute applications based on their needs and each application is granted access to files required for its execution. Access could be removed when applications execute. In particular, when user U executes application A which accesses files from customer C’s directory, access to all files in directories of customers who have a CoI relationship with C is turned off for application A when it is executed by U. Give two examples of policies discussed in the mandatory access control module of the course that could be used to control access to documents by this company. Explain your answer by discussing the specific data access requirements of the company that are satisfied by each policy. (2+2 pts.) Does the suggested implementation correctly enforce each policy that you recommend for the company? Provide a brief justification for your answer. (4+4 pts.)