Midterm Exam 2016 Solution
Midterm Exam 2016 Solution
Midterm Exam 2016 Solution
Q1. Explain what is meant by a software system having a client-server architecture. Your explanation
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
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?
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.
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
Draw a class diagram (or two, if this is more convenient) for the description above. Make sure to show
operations.