[printable version of this document (pdf)]| [308-304B Home]

308-304B Object-Oriented Design -- Assignment 2\\\ Due date: Saturday February 23, 2002 before 23:55

308-304B Object-Oriented Design - Assignment 2
  Due date: Saturday February 23, 2002 before 23:55

 


Practical information

FSA model

Draw a FSA design model (include the image inline) and give some comments for the following requirements:

In our spreadsheet application to-be-built, we want tight control over what the user types into a spreadsheet cell. In our Python/Tkinter implementation, each user keystroke will result in a KeyPressed event. The event notice will contain information about which key was pressed. In particular, we will assume the following classes of input:

Use the notation d:<DigitChar> to denote access to the actual digit d (from the event notice) in your FSA model. Use only the above abbreviated notations in your model (for example, do not write a - z, A - Z explicitly, but write c:<AlphaChar>).

Your design must accept the following input sequences, given in Regular Expression form:

In the above, the following meta-characters are used:

We assume that if an entry was already present in the selected cell, it will be overwritten (no editing of the existing entry). Note how this assumption has some repercussions on initialization.

<IllegalChar> keystrokes are not used in constructing the final cell entry. A warning message is however sent to the object messageArea.

It is obvious that after a number of keystrokes, we may recognize an INTEGER, only to later find it is really a REAL, and after some more keystrokes, that really, a STRING is entered. This should be reflected in your FSA model.

Some objects are available to the FSA:

At the end of processing a cell, the above values must be set appropriately by the automaton.

Multi-user spreadsheet

  1. Build a Petri Net model of the behaviour of a distributed, multi-user spreadsheet (in particular, assume 3 users). You should build the model using the xpns tool. Include (inline) a few representative screen grabs taken during a simulation. Provide comments of what is happening. Also include a link to the xpns model file.

    We assume that

  2. Prove from the model that it will never be possible for more than one user to be modifying the shared spreadsheet data.




Translated from TEX by TTH, version 3.02 (minor customizations by HV). On 14 Feb 2002, 18:20.