Purpose: practice modeling a system using JML
You may work in teams of 2 or 3 on the project.
Keep track of how much time you spend on this assignment.
Your task is to construct a JML model of the lift system from P2 that describes:
You will submit Java files annotated with JML specifications.
One team member should create a new Java project within his/her Mobius PVE workspace. Right-click the project and choose Team → Share Project to share this project to your team SVN repository. The other team members can check-out the project from there using the SVN Repository view in Eclipse.
Be sure to use your team repository as for P1 and P2, even if you are working alone on the project milestones.
To get you started, here is a Java class modeling a single lift. Copy Lift.java into your workspace for this project. Annotate the class as follows:
Lift.java as a guide, but feel free to improve on that approach. Annotate the classes as described in the previous item.
Don’t forget the crucial hints on using ESC/Java2 from HW10!
If this approach to modeling the lifts seems a bit odd, it may be helpful to think of this part as the Model in a Model-View-Controller implementation. We could make it into an actual such model by adding appropriate code to allow the View and the Controller code to observe the actions of the model. If we think about the problem this way, what is the View for this system in the real world? What is the Controller?
This is the first time I’ve assigned this milestone for the project. Please give me feedback as you go, so I can make adjustments as necessary. I’m not looking for any specific ”correct” answer; I’m just looking for a reasonable effort on your parts to understand how we might apply JML to this problem.
The original ESC/Java Users Manual might be a helpful resource.
Turn in your work by committing your Eclipse project to your team repository.
Each team member should complete the short, anonymous survey on ANGEL regarding this assignment. (I will study these surveys in detail after the conclusion of this offering of the course. If you have suggestions that you would like me to consider during this offering of the course, please tell me in person or use the separate Anonymous Suggestion Box on ANGEL.)