Note: I clarified problems 2 and 4 and will grant extensions for those inconvenienced.
Most desktop applications include the following use cases:
Draw a statechart diagram for this part of an application. Your only states should be wait states.
Note that a wait state is a special kind of activity in which the system does nothing until some event occurs.
Assume an auction consists of an auctioneer, an item to be sold, and two bidders.
To start, the auctioneer describes the item, then proposes a price. Simultaneously, both bidders evaluate the proposal. If bidder 1 accepts the proposal before bidder 2, then bidder 2 terminates (show this with the flow final icon.) and the auctioneer proposes a new, higher price to bidder 2. Bidder 2 evaluates the proposal. If bidder 2 accepts the proposal before the proposal expires, then the auctioneer proposes a new, higher price to bidder 1.
a. Model an auction scenario with two bidders using a sequence diagram.
b. Model an auction using an activity diagram. Provide a swimlane for the auctioneer and one for each of two bidders.
To get a diploma from the
When UNC receives an application, the application is filed until all supporting documents have been received: high school transcript and most recent tax return. Once these have been received, the application can be evaluated. Here are the minimum requirements for admission:
GPA > 3.5 or (GPA > 3.0 and resident) or (GPA > 2.0 and resident and income < $50000)
If admitted the student is considered for financial aid according to the rule:
(GPA > 3.8 and resident and income < $50000) then offer
scholarship
(GPA > 3.0 and resident and income < $50000) then offer loan
To enroll in classes, a student must first see his or her advisor. If the advisor clears the advising hold, then the student may participate in early registration. Otherwise, a student must late add classes after the semester begins.
Model the procedure of getting a diploma using an activity diagram. Use composite actions (with included diagrams) and object-in-state links.
A web browser waits for a user to specify a URL. It then fetches and displays the requested web page. Simultaneously, it waits for the user to specify another URL to fetch.
To fetch and display a web page first the container page (whatever.html) must be fetched and displayed, then all of the components (applets, images, ads, news feeds, etc.) must be fetched, added to the container, and displayed.
To fetch an item (container or component), first the cache is searched. If the search fails, then the item is fetched from its hosting server (as determined by it's URL). When the item arrives, it is placed in the cache.
Draw a state chart diagram modeling this procedure.
Create a reusable StatechartMachine class. Translate the following diagram into an instance of this class and test it.
Draw a statechart diagram that explains how an arbitrary statechart diagram is executed. In other words, explain the semantics of statechart diagrams using a statechart diagram.