Midterm Exam 2016 Solution

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

CS508 Midterm exam 2017

Q1. Explain what is meant by a software system having a client-server architecture. Your explanation

should include a diagrammatic representation of such architecture.

A client is basically a consumer of services and server is a provider of services. Client requests some services
from the server and the server provides the required services to the client. Client and server are usually software
components running on independent machines.

Q2. for Online customer can browse or search items, view specific item, add it to shopping cart, view

and update shopping cart, do checkout. User can view shopping cart at any time, please draw the

following

- The customer use cases


- one of the use cases activity diagram

Q3- consider the UML diagram shown below and answer the questions that follow it.

(a) what kind of diagram is this and what are such diagrams usually used to represent?
Sequence diagram – it’s a behavioral diagram used to show the relationship between objects.

(b) Does this diagram represent the structure or the behavior of a system?

The behavior

(c) What do the arrows labelled (ii), (iii) and (iv) represent?

(ii) represents a synchronous message from the actor to object A

(iii) represents a synchronous message from object A to object B

(iv) represents a synchronous message from object B to object C

(d) Which happens first: (ii), (iii) and (iv)?

(ii) happens first, then (ii), and finally (iv)

(e) Explain the difference between a synchronous and an asynchronous message.

Synchronous message: must wait until the message is done. It’s usually drawn using an arrow with a solid black head.

Asynchronous message:  it can continue processing and doesn’t have to wait for a response.

(f) Does this diagram contain synchronous or asynchronous message?

The diagram contains synchronous messages only.

Q4. Consider the world of libraries. A library has books, videos, and CDs that it loans to its users. All

library material has a id# and a title. In addition, books have one or more authors, videos have one

producer and one or more actors, while CDs have one or more entertainers. The library maintains one

or more copies of search library item (book, video or CD).

Draw a class diagram (or two, if this is more convenient) for the description above. Make sure to show

attributes, multiplicities and aggregations/compositions, where appropriate. No need to show any

operations.

You might also like