Docsity

Design Pattern - Distributed Objects - Past Exam, Exams of Computer Architecture and Organization

Toggle sidebar
bg1
CORK INSTITUTE OF TECHNOLOGY
INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ
Semester 1 Examinations 2011/12
Module Title: Distributed Objects
Module Code: SOFT8007
School: School of Science & Informatics
Programme Title: Bachelor of Science (Honours) in Software Development
Programme Code: KSDEV_8_Y4
External Examiner(s): Ms. Deirdre Lawless
Internal Examiner(s): Mr. Denis Long
Instructions: Answer Q1 and two other questions questions.
Duration: 2 Hours
Sitting: Winter 2011
Requirements for this examination: Answer Q1 and two other questions
questions.
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have
received the correct examination paper.
If in doubt please contact an Invigilator.
pf3

Partial preview of the text

Download Design Pattern - Distributed Objects - Past Exam and more Exams Computer Architecture and Organization in PDF only on Docsity!

CORK INSTITUTE OF TECHNOLOGY

INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ

Semester 1 Examinations 2011/

Module Title: Distributed Objects

Module Code: SOFT

School: School of Science & Informatics

Programme Title: Bachelor of Science (Honours) in Software Development

Programme Code: KSDEV_8_Y

External Examiner(s): Ms. Deirdre Lawless Internal Examiner(s): Mr. Denis Long

Instructions: Answer Q1 and two other questions questions.

Duration: 2 Hours

Sitting: Winter 2011

Requirements for this examination: Answer Q1 and two other questions questions.

Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator.

Q1. a) What is a design pattern? (3 Marks) b) How do Design Patterns improve the quality and reliability of code? (5Marks) c) What are the major classifications of design patters? (4 marks) d) List and write a short note on the main headings that appear in a design pattern’s documentation. (8 Marks) e) What are the main criticisms of design patterns? (3 Marks) f) Describe either of the following patterns (9 Marks) Singleton, Observer

Q2 A distributed java RMI based bank account simulation is required, deposit and current accounts are to be implemented. To create an account a user provides his/her name, address, a unique account number is generated for the account. Deposit accounts have a balance and users are allowed to deposit or withdraw but not overdraw. Current accounts have a balance and users are allowed to deposit and withdraw, users are allowed to overdraw up to the overdraft limit (which is the balance plus fifty per cent). The process of creating an account returns a reference to an account object which can be used to deposit or withdraw money. Account objects can be created on a Server.

  1. Describe an RMI solution for the above system use a factory for the creation of the accounts. (7 Marks)
  2. Write an RMI interface for the above. (5 Marks)
  3. Write an object implementation for the factory method(s). (6 Marks)
  4. Write the account classes. (6 Marks)
  5. Write a server and client for the above system. (10 Marks)

Q3. a) What is meant by the term Call-Back in RMI? (2 Marks) b) Give two examples of where Call-Back would be suitable. (3 Marks) c) Describe (using an example) what the client side has to do in order to receive a Call-Back from a server (code required). (8 Marks) d) Describe using an example what changes are made on the server side in order to be able to call–back a client (code required) (8 Marks) e) What is a Multi-cast and how would a server be able to Call-Back many clients. (Code required) (7 Marks) f) Describe two ways of dealing with unregistering client from the call-back. (Code required) (6 Marks)