The Bcs Professional Examinations BCS Level 5 Diploma in IT: The British Computer Society
The Bcs Professional Examinations BCS Level 5 Diploma in IT: The British Computer Society
1)
a)
You are working for a company which has decided to develop software using an object
oriented approach but has yet to standardise on a given language. Your manager has
discovered that some object oriented languages such as Java or C# implement static
typing while other languages such as Smalltalk or Ruby implement dynamic typing.
Write a report which outlines the advantages and disadvantages of static and dynamic
typing.
(8 marks)
2.
b)
After reading the report your manager asks you to differentiate between the concepts
class and type. Write a further report that achieves this.
(8 marks)
c)
Inheritance permits the creation of objects which belong to one class but conform to
more than one type. Explain this statement.
(9 marks)
a)
b)
c)
Turn over]
3.
a)
Abstraction;
Encapsulation;
Data hiding.
(9 marks)
4.
b)
A programmer wishes to create a set of classes that implement collections (e.g. Set,
SortedSet, List, SortedList). Explain how abstraction, encapsulation and data hiding
can be used to create generic classes for this purpose.
(10 marks)
c)
Describe the contribution that abstraction, encapsulation and data hiding make to the
potential of a language to encourage software reuse.
(6 marks)
PC Wide is a store selling computers and related goods, which employs a number of sales
assistants. Each sales assistant works at an electronic till. The first thing that a sales
assistant does when he/she starts work, is to login to the sales system, to which all tills are
connected. Logging in identifies them to the system. If the sales assistant has finished
work, or needs to leave the till for any reason, he/she must log off the till. Only registered
users can login to a till. The Store Manager registers the sales assistants with the system.
The Store Manager can also remove the users from the system if they leave.
When a customer wishes to purchase an item, they will approach a sales assistant, who
receives the payment, which can be either cash or credit card, from the customer. The
details of the payment are entered into the till, which records that the item has been
purchased. For expensive items, such as a laptop, the system will optionally offer the
customer insurance on the item, which they can either accept or reject. At the end of the
transaction a receipt is printed.
If the customer is unhappy with the purchase, they can return it to the shop within 15 days.
The customer will take the purchase to a sales assistant who will refund their money and
records the return of the item via the till.
Every week the Store Manager generates a sales report, which shows what items have
been sold that week.
a)
b)
Discuss how Use Case diagrams and scenarios contribute to the development of
the usage requirements of a system. Within your answer include examples from the
above scenario.
(10 marks)
5.
a)
Explain what is meant by the term design pattern in the context of object oriented
programming. Within your discussion, highlight what is the motivation for using
design patterns from a programmers point of view.
(10 marks)
b)
Design patterns can be classified according to the problem they solve. For
example:
Creational Patterns:
Abstract factory, Builder, Object Pool and Singleton patterns
Structural Patterns:
Adaptor, Decorator, Faade and Proxy patterns
Behavioural Patterns:
Command, Iterator, Observer and State patterns
Choose ONE design pattern from EACH of the above classifications and give a
detailed description of each, stating the problem they address and the basis of the
solution they offer.
(15 marks)
Turn over]
6.
The class diagram below represents a Banking system that records what type of customers
they have and their accounts.
Account
-accountNumber : int
-type : string
-balance : float
-overdraftLimit : float
Customer
Branch
1
-branchNumber : string
-name : string
-address : string
-telephoneNumber : string
1..*
-has
-customerNumber : string
-name : string
-address : string
-telephoneNumber : string
-noOfCustomers : int
1..*
-assignedTo
-employs
-worksFor
Employee
-employeeNumber : string
-name : string
-address : string
-extensionNumber : int
-salary : float
Business
Personal
-faxNumber : string
-annualTurnover : float
-emailAddress : string
-mobileNumber : string
-lookedAfterBy
Business Manager
-assignedTo
-commission : float
*
a)
Describe what the diagram above represents. Include all structural constraints.
(15 marks)
b)
Explain why the object diagrams below (i-ii) are not legitimate instances. State how they
can be made legitimate.
(5 marks)
i)
ii)
c)
What is the purpose of an activity diagram? Describe how they might help in the development
of the Banking system.
(5 marks)