Windows Systems Programming: Spring 2002

[ Home | Syllabus | Course Notes | Assignments | Search]


Final Exam

Rules of taking this test

  • You must work on your own.
  • You are not allowed to talk with anyone in the class about the test after taking the test.
  • You can ask me questions or send e-mail.
  • You must return your answers by 5PM Monday May 6
  • You may return the test by e-mail (preferred), fax (683-4900) or personally to me.
    (must be legible - I cannot grade what I cannot read)
  • You must sign the honor pledge and either fax or return original to me (even if you e-mail the answers).
    However, the honor pledge does not have to be in within 24 hours.
    However, you will not get your grade until the honor pledge is turned in.

Honor Pledge: I pledge that I have neither given nor received unauthorized help in taking this exam.

__________________________________________________________


 
You must sign this honor pledge and send the original by regular mail to Dr. Wild, Dept. Computer Science, Old Dominion University, Norfolk, VA 23529-0162 OR send it by  FAX to (757) 683-4900 OR slip it under my door.

  1. We have already seen one bug in the SpellChecker example from chapter 4 of the COM+ book. I claim there is a second similar bug. What is it? What might be the effect of this bug? How would you fix it? (10)
  2. Is the SpellChecker COM object in chapter 4 thread safe? Justify your answer.(5)
  3. Document View represents an important programming framework that is supported by MFC. However, as implemented, documents must be stored on a file system accessible to the client. What would it take to modify the MFC document/view framework so that documents could be stored anywhere on the internet? Specifically, name the message handlers used by document/view that would have to be changed and why. Also list the issues that need to be addressed to make this change (you do not need to write any programs).(10)
  4. In the document/view program from chapter 12 
    1. What would happen if the line
      SaveBarState (_T ("MainBarState"));
      was deleted. (5)
    2. Where (specifically) is the information related to this statement saved? (5)
  5. In the document view program sdiSquares, answer the following questions about the "SetSquare" function on page 531 (and reproduced below)
    void CSquaresDoc::SetSquare(int i, int j, COLORREF color)
    {
    	ASSERT (i >= 0 && i <= 3 && j >= 0 && j <= 3);
    	m_clrGrid[i][j] = color;
    	SetModifiedFlag (TRUE);
    	UpdateAllViews (NULL);
    }
    1. What would be the effect of deleted the line containing "SetModifiedFlag"? (3)
    2. What would be the effect of deleting the line containing "UpdateAllViews"? (3)
    3. Suggest a programming change (other than in the above function) that would make the program behave as it did before the line containing "UpdateAllViews"  was deleted. List the line(s) of code needed for this change and where the change would be placed. (5)
    4. After deleting  the line containing "UpdateAllViews", the program is compiled and you receive only the executable program. What can you so to overcome the change in the behavior of the modified program? (3)
  6. In the document/view program sdiSquares, what would be the effect of not overriding the "OnNewDocument" message handler? (5)
  7. It is claimed that the WSDL file is not essential to SOAP. 
    1. Name one client in the "calc" samples of the soaptoolkit that does not use WSDL BUT uses SOAP directly without a proxy (ie. redirecting server). (5)
    2. In the clients that do use WSDL, what object uses it and why is it used? (5)
  8. Explain how you could access a SOAP service directly (without a proxy) and without installing any of the Microsoft soaptoolkit DLL's on your client. (Imagine that the client is working on a UNIX machine).(5)
  9. Consider the "RPC" C++  implementation of the "calc" service from the soaptoolkit (defined in the visual studio project "CalcSvcRpcCpp.dsp". What changes would have to be made to the "Add" method so that the input parameters and return values were integers. List all lines that would have to be changed on the server side to make this modified service SOAP accessible - include all files affected on the server.(10)
  10. MFC supports two types of "threads", worker threads and UI threads. A UI thread uses message queue. Therefore it is not possible to be processing more than one client's message at a time Does this make a UI thread, thread-safe? explain. (5)

Copyright chris wild 1999-2001.
For problems or questions regarding this web contact [Dr. Wild].
Last updated: April 29, 2002.