Question: Using Scala can someone help me create a program using the following instructions. /EXERCISE 4: complete the following function. // It has two parameters -r:
Using Scala can someone help me create a program using the following instructions. 
/EXERCISE 4: complete the following function. // It has two parameters -r: (a reference to) an instance of RefInt (see above for the definition of the class RefInt); AND I-f: a function that accepts (a reference to) an instance of RefInt. //Your code must call f with a copy* of the RefInt r, i.e., it must make a new instance of RefInt with the same Int. // Your code should return true if f has NOT changed the Int stored in the copy of r. Otherwise it should return false. def refint4 (r RefInt, f : RefIntUnit): Boolean TODO: Provide definition here. false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
