Ask Question
13 December, 01:06

Problem (Commands) : Let c be a copy flag and let a computer system have the set of rights {read, write, execute, append, list, modify, own}. 1. Using the syntax of commands discussed in class, write a command copy_all_rights (p, q, o) that copies all rights that p has over o to q. 2. Modify your command so that only those rights with an associated copy flag are copied. The new copy should not have the flag copy. 3. In the previous part, what conceptually would be the effect of copying the copy flag along with the right?

+3
Answers (1)
  1. 13 December, 01:41
    0
    Aee explaination

    Explanation:

    1.

    command copy_all_rights (p, q, s)

    if read in a[p, s]

    then

    enter read into a[q, s];

    if write in a[p, s]

    then

    enter write into a[q, s];

    if execute in a[p, s]

    then

    enter execute into a[q, s];

    if append in a[p, s]

    then

    enter append into a[q, s];

    if list in a[p, s]

    then

    enter list into a[q, s];

    if modify in a[p, s]

    then

    enter modify into a[q, s];

    if own in a[p, s]

    then

    enter own into a[q, s];

    end

    2.

    command copy_all_rights (p, q, s)

    if own in a[p, s] and copy in a[p, s]

    then

    enter own into a[q, s];

    if modify in a[p, s] and copy in a[p, s]

    then

    enter modify into a[q, s];

    if list in a[p, s] and copy in a[p, s]

    then

    enter list into a[q, s];

    if append in a[p, s] and copy in a[p, s]

    then

    enter append into a[q, s];

    if execute in a[p, s] and copy in a[p, s]

    then

    enter execute into a[q, s];

    if write in a[p, s] and copy in a[p, s]

    then

    enter write into a[q, s];

    if read in a[p, s] and copy in a[p, s]

    then

    enter read into a[q, s];

    delete copy in a[q, s];

    end

    3.

    "q" would be the effect of copying the copy flag along with the right, because q would have copy right to transfter to another, which may not be intended.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Problem (Commands) : Let c be a copy flag and let a computer system have the set of rights {read, write, execute, append, list, modify, ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers