inf 5150 6-dec-15inf5150 infuit haugen / stølen exercises for monday 150904

5
I N F 5 1 5 0 Aug 28, 2022 INF5150 INFUIT Haugen / Stølen Exercises for Monday 150904

Upload: horace-payne

Post on 17-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INF 5150 6-Dec-15INF5150 INFUIT Haugen / Stølen Exercises for Monday 150904

INF

5150

Apr 21, 2023 INF5150 INFUIT Haugen / Stølen

Exercises for Monday 150904

Page 2: INF 5150 6-Dec-15INF5150 INFUIT Haugen / Stølen Exercises for Monday 150904

INF

5150

Apr 21, 2023 INF5150 INFUIT Haugen / Stølen

Discussion 3: Obligatory Exercise ideas

This could give the students real influence on the obligatory exercise this semester

Requirements– Should involve positioning

– Should involve communication by sending SMS to/from the system

– Human beings should interact through the infrastructure of the system

– The interaction should be concurrent

– May or may not involve a database that may or may not be implemented with persistent data

Take notes of the discussion in groups of 3-4– 10 minutes

The assistant teacher will collect the notes Quick presentation in plenary session

– subsequent plenary discussion 10 minutes

Page 3: INF 5150 6-Dec-15INF5150 INFUIT Haugen / Stølen Exercises for Monday 150904

INF

5150

Apr 21, 2023 INF5150 INFUIT Haugen / Stølen

Earlier Obligatory Exercises

2007: Survival of the SMSest– a survival game with attacks, guards etc.

2006: ICU revisited (personal surveillance system)– the ICU solutions from INF2120 given as starting point

2005: Multiple Blind Date– setting up anonymous events for people to sign up for– placed at the most optimal place

2004: Appointment reminder system (e.g. dentist office)– ask for appointment on SMS– get appointment reminder

2003: McEthnic restaurant– simulating the STAIRS example from UML2003 article

Page 4: INF 5150 6-Dec-15INF5150 INFUIT Haugen / Stølen Exercises for Monday 150904

INF

5150

Exercise1: Specify a new system/service

Three friends trying to decide what movie to see. Three movie choices Exercise:

– Model an environment where three friends are discussing which movie to see.

– There are three movies, represented conceptually with signals: movie(1), movie(2), movie(3).

– A person says ”I want to see movie 1” to the others by sending the ”movie(1)” signal to our system, which notifies the others.

– You may add more signals if you need them. – If all three friends have chosen different movies we have a tiebreak scenario

If this is the first tiebreak; the friends are notified that they have to vote again If it is the second tiebreak; the system chooses a movie at random for them.

– The executable definition of all three friends should be equal. – Try to follow the structure from ICU0 with respect to where to place your

diagrams.

Apr 21, 2023 INF5150 INFUIT Haugen / Stølen

Page 5: INF 5150 6-Dec-15INF5150 INFUIT Haugen / Stølen Exercises for Monday 150904

INF

5150

Exercise 2: Implement the system

Implement the previous system– Draw the system using all the information and tools at your

disposal. – You may assume that the system has been initialized with some

data (you may also initialize them during the transition from Initial) Static Ids Number of movies

– If we assume that the specification is purposely communication-interface independent (as we cannot send Movie signals over PATS), we may assume that SMS signals are decent implementations of Movie signals if they are of a specific format: e.g. Stud1 konto username movie(1).

Apr 21, 2023 INF5150 INFUIT Haugen / Stølen