Docsity

CSE775 - Distributed Objects Midterm Examination, Spring 2004 - Prof. James Fawcett, Exams of Engineering

Toggle sidebar
bg1
CSE775 โ€“ Distributed Objects Spring 2004
Midterm #1
This is a closed book examination. Please place all your books on the
floor beside you. You may keep one page of notes on your desktop in
addition to this exam package. All examinations will be collected at
8:20. Please be prepared to quickly hand in your examination at that
time.
If you have any questions, please do not leave your seat. Raise your
hand and I will come to your desk to discuss your question. I will
answer all questions about the meaning of the wording of any
question. I may choose not to answer other questions.
You will find it helpful to review all questions before beginning. All
questions are given equal weight for grading, but not all questions
have the same difficulty. Therefore, it is very much to your advantage
to answer first those questions you believe to be easiest.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download CSE775 - Distributed Objects Midterm Examination, Spring 2004 - Prof. James Fawcett and more Exams Engineering in PDF only on Docsity!

Midterm

This is a closed book examination. Please place all your books on the floor beside you. You may keep one page of notes on your desktop in addition to this exam package. All examinations will be collected at 8:20. Please be prepared to quickly hand in your examination at that time. If you have any questions, please do not leave your seat. Raise your hand and I will come to your desk to discuss your question. I will answer all questions about the meaning of the wording of any question. I may choose not to answer other questions. You will find it helpful to review all questions before beginning. All questions are given equal weight for grading, but not all questions have the same difficulty. Therefore, it is very much to your advantage to answer first those questions you believe to be easiest.

  1. In Project #2 you are making COM components out of CppToker and CppSemiExp. Assuming that your client will interact directly with CppSemiExp^1 , write the IDL for an appropriate interface that allows you to specify the file to be parsed and to ask for the next available semi-expression. Please pass back the semi-expression as an array of BSTRs. (^1) Your design may not do this, but please use this design strategy to answer the question.
  1. Describe the COM memory management rules. What are names of the COM-based allocators and when are they used? May you ever use a non-COM based allocator when using a COM component?
  1. Imagine that you are the software architect for development of a large distributed software system. What are the advantages and disadvantages of using a component^2 technology? What are your choices for component technology and what factors would influence you choice? (^2) We use the term component, throughout this examination, in the sense discussed in class, e.g., an entity with the specific properties we have discussed. Noting these properties is a good way to start the answer to this question.
  1. Write client code, component code, and IDL for a COM interface that specifies a file name and path, and returns an error message if the file can not be opened^4. (^4) Here, you are not being asked to write the entire client or component. Just write code that handles the specific tasks of specifying a file, attempting to open it, and reporting error information. You may choose to use either a custom error message or use a COM specific error protocol.
  1. What distinguishes a control from a component?
  1. Why is COM aggregation implemented with more than one IUnknown interface for at least one of the component participants? Describe the COM policy that governs this design.
  1. What are the similarities and differences in marshalling between client and component for STA and MTA out-of-process components?