3. Classes, Types, and Declarations

  1. Peter Fritzson

Published Online: 13 OCT 2010

DOI: 10.1002/9780470545669.ch3

Principles of Object-Oriented Modeling and Simulation with Modelica 2.1

Principles of Object-Oriented Modeling and Simulation with Modelica 2.1

How to Cite

Fritzson, P. (2004) Classes, Types, and Declarations, in Principles of Object-Oriented Modeling and Simulation with Modelica 2.1, John Wiley & Sons, Inc., Hoboken, NJ, USA. doi: 10.1002/9780470545669.ch3

Publication History

  1. Published Online: 13 OCT 2010
  2. Published Print: 7 JAN 2004

ISBN Information

Print ISBN: 9780471471639

Online ISBN: 9780470545669

SEARCH

Keywords:

  • duplicate variable names;
  • access control;
  • nested classes;
  • restricted classes;
  • enumeration types

Summary

This chapter contains sections titled:

  • Contract Between Class Designer and User

  • A Class Example

  • Variables

  • Behavior as Equations

  • Access Control

  • Simulating the Moon Landing Example

  • Short Classes and Nested Classes

  • Restricted Classes

  • Predefined Types/Classes

  • Structure of Variable Declarations

  • Declaration Prefixes

  • Declaration Order and Use Before Declaration

  • Scoping and Name Lookup

  • The Concepts of Type and Subtype

  • Summary

  • Literature

  • Exercises