Assignment Chef icon Assignment Chef

[Solved] CSE522 Assignment 5-Use-Case and Activity Diagrams using StarUML

5.0 1 customer review Digital download

Digital download

$25.00

Availability
In stock
Checkout
One item

Need a hand?

Message us on WhatsApp for payment or download support.

WhatsApp QR code Open WhatsApp
Part 1: Use-Case and Activity Diagrams using StarUML You are to develop an external view of an Online Forum application described briefly below. The Online Forum caters to three main categories of Users Students, TAs, and Professor[1] each with different privileges. TAs and the Professor are collectively referred to as Staff. The Online Forum supports three types of Posts: a Q&A Post, a Poll Post, and a Resource Post. Staff may make all three types of Posts, but Students may only make a Q&A Post and a Poll Post. As the focus of this assignment is on the external view of the application, the internal details of these posts are not relevant in this assignment. All Users must login to use the Online Forum; they may logout at any time but must login back again in order to take any actions. Initially, the Professor logs in and creates the class which includes enrolling the TAs and Students. Only after the class is created may Students and TAs login and activate their accounts activation to be done only once, at the start of the semester. During the course of the semester, Students, TAs, and the Professor all operate concurrently relative to one another in taking their actions on the Online Forum. However, each User operates sequentially in taking their individual actions. Each User may make any number of Posts (of the permitted types) and in any order. As noted above, a user may logout at any time, but must login back again before any further other action can be taken. Finally, the Online Forum maintains statistics on the usage of the online forum, such as average response time for queries, numbers of posts made by users, etc. All activity in the Online Forum ends at the end of the semester. Post, Create Class. Finally: Save your model as a file OnlineForum.mdj. The suffix mdj is automatically added by StarUML Important Note: Points will be deducted for sloppily drawn use-case and activity diagrams. Hence pay attention to drawing and aesthestics, as noted in the instructions above. Strive for symmetric diagrams with minimal line crossings to the extent possible some asymmetry and line crossings are acceptable. [1] Assume there is only one Professor for the course, although online forums such as Piazza allow more than one Professor. Part 2: Communicating State Charts Download and unzip A5_Part2.zip. It has four files: Circular_Buffer.mdj, Circular_Buffer.java, Circular_Buffer.txt, and MessagePassing.jar. File Circular_Buffer.mdj contains a StarUML State Chart (reproduced above) giving the outline of the controller for a circular buffer. This buffer is accessed by two concurrent processes, Producer and Consumer, who communicate with the buffer controller using two channels, put and get. The producer repeatedly does a put! and the consumer similarly does a get?, and the buffer controller performs the respective complementary operations. File Circular_Buffer.java contains the outline of a Java implementation of the above state chart using the Message Passing Library discussed in Lecture 15 examples were posted in Sample Programs MessagePassingExamples.zip. The file gives the main program (class Driver), the classes Producer and Consumer, and also the outline of class Circular_Buffer. Class Circular_Buffer uses an integer array, data, of size n in order to hold its data. It has a field count that gives, at any given time, the number of values that can be taken out of the buffer. It also has two indices p and g to point, respectively, to the places in the array where the next value is to be put by the producer and taken out by the consumer. These indices are incremented (modulo n) as put/get operations take place. The actual insertion and retrieval of values are performed by two methods put() and get() respectively. What you should do:
  1. Complete the state chart mdj by providing suitable labels on the four transitions shown. Each label is of the form event [ guard ] / action Lecture 26 includes a demo on how to construct StarUML State Charts. These labels should collectively express the synchronization policy of the buffer controller, namely, that:
(i) when the buffer is empty (count == 0) only a put operation is permitted; (ii) when the buffer is full (count == n) only a get operation is permitted; (iii) otherwise, both put and get are permitted the selection is non-deterministic. In specifying the transition labels in StarUML:
  1. Complete the run() method in class Circular_Buffer providing an implementation of the above synchronization policy. As the state chart specifies that the buffer controller operates in a repetitive cycle, the top level of the run() method should be a while(true) {}
In Eclipse, right-click on the project, then select Build Path Configure Build Path Add External JAR browse and select MessagePassing.jar. Run the completed program under JIVE after adding Scheduler.* to Debug Configurations JIVE Exclusion Filter. Check that the Console output shows the strings Put 1, , Put 50 as well as Get 1, , Get 50. The Put and Get strings will not be in strict alternation, but their respective values should be in ascending order this property is to be checked as specified below. Save the Execution Trace in a file, Circular_Buffer.csv, and load it into the Property Checker: