CMPS115 Quiz, Spring 2003 This is a take-home exam, due in-class at the beginning of class on May 27. If, for some reason, you are unable to attend class on May 27, you must email your answers to cs115-staff in either PDF or text format by 9:30AM on May 27. Obviously, a take-home exam depends on trust; you are expected to perform your own work and not to solicit assistance from other classmates or people. The exam is open book, so you are free to consult any of the course readings, as well as any other materials you find relevant. Standard academic quotation and citation rules apply: if you directly quote someone else's writing, you must cite their work. That said, your exam answers are expected to be primarily your own words. The textual component of your answers must be typewritten, and handwritten exams will not be accepted. Diagrams may be neatly hand drawn. Proofreading your answers for spelling and grammar is expected, and you will be graded down for significant deficiencies in either. Good answers will be concise and to the point. While partial credit will of course be given, meandering, long-winded answers that contain a mixture of correct and incorrect information are more likely to be will be graded down. Read each question carefully, as they often have multiple parts. All questions are weighted evenly. 1. The "scheduling triangle" for software engineering is budget, schedule, features -- a well-run project has a clear understanding of the relative importance of these constraints on the project. Provide a ranking of these items for your project (which comes first, second, and third), given the requirements and constraints you face as a student. Explain your rationale for ranking the items in the order you chose. Note that this question is not looking for a simple rehashing of the meaning of these terms, but a crisp explanation of their relative importance in your current context. Also, answer the following: At the start of the project, did your group discuss and agree to these priorities amongst yourselves? With your TA? If so, was it helpful? If not, can you see how it would've been helpful? 2. (a) What are the two most important software qualities for the software you are developing for your term project? Why are these two qualities so important? (b) What are the two least important software qualities for your project? Why? 3. [Please follow the instructions provided in the following imaginary scenario. Such a request could be made of you by a designer on you project.] "We're building a Web server. I've been thinking about authentication and want to do some modeling. When requests come in, I imagine that a RequestHandlerThread object will be created to handle it. "The 'run' method of RequestHandlerThread will construct a Request object out of the raw bytes coming from the client. I imagine there will be a subclass of Request for each of the following HTTP operations we plan to support: GET, PUT, POST, and DELETE, with POST being a subclass of GET. "Also, we'll have an object called AuthenticationState that will maintain timeout limits on authentication cookies. After creating a Request object, the run method of RequestHandlerThread will call the 'checkAuth' method on AuthenticationStata. "We to give a presentation on this soon. Can you please prepare a UML object diagram for this design, and also an interaction diagram between these three objects?" 4. Give a reasonable set of black-box tests for the following String operation from Java: public class String { public int lastIndexOf(String str, int fromIndex) // Returns the index within this string of the last occurrence of the // specified substring. The integer returned is the largest value k // such that: // // k <= Math.min(fromIndex, this.length()) && this.startsWith(str, k) // // If no such value of k exists, then -1 is returned. // // Parameters: str - the substring to search for. // fromIndex - the index to start the search from. // // Returns: the index within this string of the last occurrence of the // specified substring. // // Throws: NullPointerException - if str is null. } (Remember that this is an INSTANCE method, meaning there is an additional, implicit argument to this method, the "self" or "this" argument.) 5. List the major steps of a software inspections and explain briefly the benefit of each. Having now gone through an inspection, let me know what you think are the strengths and weaknesses of this practice.