List[Null, Null, Null, Null, Null, Null, Null, Notebook[List[Cell[CellGroupData[List[Cell["Exercise 1", "Title"], Cell[CellGroupData[List[Cell["Access Control", "Section"], Cell[TextData[List["\nComplete the classes ", StyleBox["Access ", Rule[FontFamily, "Courier"]], "and", StyleBox[" Acc ", Rule[FontFamily, "Courier"]], "below. The variable ", StyleBox["acc", Rule[FontFamily, "Courier"]], " is an instance of the class ", StyleBox["Acc", Rule[FontFamily, "Courier"]], ", which contains the variables ", StyleBox["a, b, c, d", Rule[FontFamily, "Courier"]], " and ", StyleBox["e", Rule[FontFamily, "Courier"]], ", where ", StyleBox["d", Rule[FontFamily, "Courier"]], " and ", StyleBox["e", Rule[FontFamily, "Courier"]], " are protected. Where can the variables be set? Set a = 7.4 in the class Access."]], "Text"], Cell["class Access\n  ...\nequation\n  ...\nend Access;", "ModelicaInput"], Cell["", "Text"], Cell["class AccessInst\n  Access acc;\nend AccessInst;", "ModelicaInput"], Cell[CellGroupData[List[Cell["Answer", "Subsection"], Cell[TextData[List["The public variables ", StyleBox["a, b", Rule[FontFamily, "Courier"]], " and ", StyleBox["c", Rule[FontFamily, "Courier"]], " can be set in either class, while ", StyleBox["d", Rule[FontFamily, "Courier"]], " and ", StyleBox["e", Rule[FontFamily, "Courier"]], " must be set in class ", StyleBox["Acc", Rule[FontFamily, "Courier"]], ". The variable a must be a parameter, since we want to change it in the class Access."]], "Text"], Cell["class Access\n  parameter Real a;\n  Real b;\n  Real c;\nprotected\n  Integer d, e;\nequation\n  b = 2.0;\n  c = 1.3;\n  d = 5;\n  e = 7;  \nend Access;", "ModelicaInput"], Cell["\nSince a is a parameter it can not be changed during simulation, so it can not be modified in the equation section.", "Text"], Cell["class AccessInst\n  Access acc(a = 7.4);\nend AccessInst;", "ModelicaInput"], Cell["", "Text"], Cell[CellGroupData[List[Cell["Simulation of Access and AccessInst", "Subsubsection"], Cell["simulate( Access );", "ModelicaInput"], Cell[BoxData["\"<SimulationData: \\!\\(Access\\) : 2004-1-30 11:10:24.5801744 : \\!\\({0.`, 1.`}\\) : 502 data points : 1 events : 5 variables>\\n\\!\\({\\*TagBox[\\\"a\\\", HoldForm], \\*TagBox[\\\"b\\\", HoldForm], \\*TagBox[\\\"c\\\", HoldForm], \\*TagBox[\\\"\[UnderBracket]derdummy\\\", HoldForm], \\*TagBox[\\\"\[UnderBracket]dummy\\\", HoldForm]}\\)\""], "Output"], Cell["simulate( AccessInst );", "ModelicaInput"], Cell[BoxData["\"<SimulationData: \\!\\(AccessInst\\) : 2004-1-30 11:10:35.1426068 : \\!\\({0.`, 1.`}\\) : 502 data points : 1 events : 5 variables>\\n\\!\\({\\*TagBox[\\(acc . a\\), HoldForm], \\*TagBox[\\(acc . b\\), HoldForm], \\*TagBox[\\(acc . c\\), HoldForm], \\*TagBox[\\\"\[UnderBracket]derdummy\\\", HoldForm], \\*TagBox[\\\"\[UnderBracket]dummy\\\", HoldForm]}\\)\""], "Output"]], Open]]], Open]]], Open]]], Open]]], Rule[FrontEndVersion, "5.1 for Microsoft Windows"], Rule[ScreenRectangle, List[List[0, 1280], List[0, 951]]], Rule[WindowSize, List[883, 924]], Rule[WindowMargins, List[List[7, Automatic], List[Automatic, 0]]], Rule[StyleDefinitions, "MathModelica.nb"]], Null, Null, Null, Null, Null]