Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

4320_COMP_SCI_X_0006

Programming Assignment 2

Due 14 Oct by 23:59 Points 200 Subming an external tool

Available 7 Sep at 0:00 - 18 Oct at 23:59

Assessment

Weighting:

20% (200 Marks)

Task

description:

In this assignment, you will be designing and implemenng Petri- nets to manage signalling in a rail yard.

Academic

Integrity

Checklist

Do

Discuss/compare high level approaches

Discuss/compare program output/errors

Regularly commit/push your work and add

comments/notes on you commits

Be careful

Θ Code snippets from reference pages/guides/Stack Overow must be attributed/referenced.

Θ Only use code snippets that do not significantly contribute to the exercise soluon.

Do NOT

Submit code or Petri-nets not solely authored by you. Post/share code or complete Petri-nets on discussion board/online/etc.

Give/show your code or Petri-net to others

Set your GitHub repository to " Public"

Before you begin

This assignment will be marked using a combinaࢼon of automated and manual techniques.

You must log your development progress

During manual marking, we will look look at your development process. If we do

not see a clear path to a solution

(i.e. code changes and regular commits and comments on those commits reecting your learning to develop your implementation)

you may forfeit up to 100 marks.

An example case of forfeiࢼng 100 marks would be the sudden appearance of working code with no prior evidence of your development process.

It is up to you to provide evidence of your development through regular commits and comments.

You must test your code

Event-Driven code is especially error-prone, so testing is important.

During marking, we will look look at your test cases and test case coverage.

If you do not sufficiently test your code you may forfeit up to 100 marks. An example case of forfeiࢼng 100 marks would no test cases present.

This assignment requires thought and planning. You need to start early to allow

yourself time to think of what and how to test before writing any code. Failing to do this is likely to make the assignment take far more time than it should.

Expand All

Collapse All

Aims

Apply Event-Driven Techniques to manage concurrent events.

Apply formal methods and Petri-nets to the design of a robust system.

Overview

You have been hired by a railway company to build a prototype of the so[ware to manage an interlocking for one corridor in their rail network:

Freight and passenger lines at Islington

An interlocking is the system that ensures signals and points in a section of railway do not allow trains to occupy the same section of track.

Your system needs to:

Allow trains to pass through the area without colliding.

Avoid deadlock & ensure all trains that enter the area are able to successfully pass through if possible.

Make efficient use of the track

Your Task

Your task is to plan and implement the system described above.

See Rail Network Details below for more information on system layout and requirements

First, plan out your system using Petri Nets

Refer to the Notes/Readings listed in the section below for ways to use Petri- nets to represent this type of system.

Include all of your working in your Github commit log/comments.

Since you won't have any code to commit at this stage, you could add your current diagram, or alternately keep a text-based log of your

progress whose commits you can add comments on.

Finally, implement your code.

You are given a Java Interface HERE that provides function signatures that your implementing class(es) will need to implement.

Review this and make sure you understand it before writing code.

Your implementation should at minimum contain a class named

InterlockingImpl in a le named InterlockingImpl.java that implements the interface above.

Event Driven systems are particularly prone to errors so you'll