Subject: Software Design and Architecture

nfs_dsr
labwork.docx

Problem 1: Given the following Game to design, please answer the related questions in the next pages.

As a software engineer you are asked to design a three level board game with the following description of the game and the requirements

This game will be a board game which user will start from the top left corner and will try to go to the bottom right corner. The board will have some of the rules and the features.

· On the board some cells will be black which will indicate walls. Which doesn’t give and access to the user

· some of the cells will have a gold

· some of the cells will have a water

· some of the cells will have monster

· cells next to monster smell

· Monsters can move each direction one square

· the user will use arrows in the keyboard to move in the game.

· Shift+(up arrow) is used to jump

· Shift+(right arrow) is used to swim

· user can use sword or arrow(arc) to kill the monster

· to use sword user should jump up first

· user can use shovel or a drill machine to dig the gold. The gold can be in 1-10 meters deep and shovel can only dig up to 5 meters.

· User will start with 70 points

· For every move user will lose 1 point

· Swimming through a cell costs 5 points

· Jumping over a cell costs 10 points

· each arrow cost 10 points

· using sword cost 5 points

· Using shovel costs 5 points and drill machine costs 15 points

· Finding gold earns 100 points

· Killing each monster earns 30 points.

· User can have 5 arrows; Arrows can be used from 2 cells ahead.

· Monsters blinks therefore when you shoot them it should corresponds to the time they are available. If user uses sword can be killed by the monster

Below is an example board design which M:monster, G:gold, S:Smelly, blue color represent water

Some level specific rules are mentioned below

Level 1:

User should be able to move 1 square each time (any direction)

User will be able to jump up

User will be able to use shovel to dig for the gold

User can use sword to kill the monster

Level 2

User should be able to move 1 square each time (any direction)

User will be able to jump up and swim

User will be able use shovel to dig for the gold

User can use sword or arrow to kill the monster

Level 3:

User should be able to move 1 square each time (any direction)

User will be able to jump up, swim and smell

User will be able to use shovel and drill machine to dig for the gold

User can use sword or arrow to kill the monster

The user will only be able to play the game if he has points. If the user has no points left before the end of the game, the game will be over and the user will lose. Some of the details of the game is not provided however you have enough information to complete the below questions.

a) Please draw the Use case diagram for the above game (you can omit administrator of the system in your drawing)

b) Please write “going to the exit” scenario for level 2

c) Please draw a sequence diagram to kill the monster with an arrow. You can assume that all your function calls will return a positive answer (but you should call the functions)). Hint: Please find out first what kind of objects (classes) you would have for this part of the game.

2- You are asked to design online parking reservation system for Ercan airport in Cyprus. The system will be available on the web/mobile platforms. The user will be able to get in to the system and reserve the parking lot he would like to park. For the user in order to make a parking lot reservation, he should have a booked ticket from THY airlines and his car should be registered in Cyprus Department of Motor Vechiles (CDMV) on his name. Once the customer makes reservation, the parking lot administration should be informed about the registration of the user.

a) Please provide the context diagram for the above system. Be specific about the source and sink and add the specific details on the diagram

b) Please draw level1 (the one after context diagram) Data Flow diagram for the above system. Please be specific about the message exchange. Show the system boundaries. Note: you can omit alternate cases on the graphic