You need to implement the UpdateGrade() method

You are adding a public method named UpdateGrade toa public class named ReportCard.
The code region that updates the grade field must meet the following requirements:
-It must be accessed by only one thread at a time. -It must not be vulnerable to a deadlock situation.You
need to implement the UpdateGrade() method.
What should you do?

You are adding a public method named UpdateGrade toa public class named ReportCard.
The code region that updates the grade field must meet the following requirements:
-It must be accessed by only one thread at a time. -It must not be vulnerable to a deadlock situation.You
need to implement the UpdateGrade() method.
What should you do?

A.
Option A

B.
Option B

C.
Option C

D.
Option D



Leave a Reply 3

Your email address will not be published. Required fields are marked *


MarcoJacob

MarcoJacob

C

SakhipovRuslan

SakhipovRuslan

Locking on type doesn’t make sense. It is “A”

Anu

Anu

lock should always be on a private , non-string,non-this reference variable