Exercise 3

1 More on redeclaration


Write a class
MoreRed that declares two variables v1 and v2 being vectors and one variable x being an Integer. Set x to a value.





Use the class above to redeclare the dimension sizes of
v1 and v2 and the type of x.



1.1 Hint

In the redeclaration-statement of the variables, you have to include the term "parameter" so that they, as parameters, can be modified.


1.2

1.2.1 MoreRed


1.2.2 MoreRed2

Notice that you don't need the keyword replaceable for v1 and v2.