Exercise 1

1 Access Control


Complete the classes
Access and Acc below. The variable acc is an instance of the class Acc, which contains the variables a, b, c, d and e, where d and e are protected. Where can the variables be set? Set a = 7.4 in the class Access.




1.1

The public variables a, b and c can be set in either class, while d and e must be set in class Acc. The variable a must be a parameter, since we want to change it in the class Access.




Since a is a parameter it can not be changed during simulation, so it can not be modified in the equation section.



1.1.1 Simulation of Access and AccessInst