(C) 1997, DL, UTA CSE 5324 Name___________________________________ Software Engineering I Exam 2, Summer 1996 Please read this: This is a closed book, closed notes exam. You may however use one note page of notebook size (letter) with hand written notes on one side. If you use a note page it must be turned in with this exam. Use a dark ink pen and print answers on the test paper following the question. Turn in all pages of the test. Write your answers legibly. Unreadable answers will be counted wrong. Make sure you have all pages of the test. Read each question carefully and be sure your answer addresses the question. If any question is unclear please raise your hand or come to the front of the class room. Please listen for any clarification given in class. This exam is a timed exam. You must complete the exam and turn it in before or at the end of class. No late exams will be accepted. Point values are given for each question. The exam has a total of 150 points. 1. [ pts] Short answers: a.) What are the relationships between modularity, coupling and cohesion? What should one strive for, and why? b.) At what stage of project "life-cycle" is a PDL used? What should any (all) PDLs include (syntax) as a minimum, give 2: 1. 2. Does a PDL differ from a high-order programming language, if so how and why? c.) One design heuristic deals with program structures with high fan-in (desirable), fan-out, and "depth". The goal is a relationship between these: what is that goal? Why? 2. [ pts] A popular application of PC and workstations is CAD (Computer Aided Design). A CAD system allows an operator to draw shapes on the screen, later to be printed. These shapes are composites of simple geometric shapes, in this system the following: A line: defined by two end points a square and rectangle: defined by lower left and upper right points a triangle: defined by three end points a circle: defined by center point and any other point on the circle an arc: (a part of a circle), defined by two end points and one between points are x, y pairs in screen coordinates where the lower left screen is 0, 0 and the upper right is max_x, max_y. To be visable all lines have a thickness (given in screen pixels) and a pen color. Enclosed shapes may optionally be filled with a solid color. An operator describes each shape (by points, color, etc.) and some parts (points) may be off the screen (one end of a line). Each shape has a name (user defined) and may later be moved by adding to each x, y points ("translate") or moved with respect to another point ("rotated") or removed entirely. Some shapes should be checked for correctness (triangles and arcs should not have all points on a single line) and all should be checked to determine if some (or all) of the shape is off the screen. When drawing a composite of several shapes, the order of which shape is drawn (some may partially or completely overlap) is defined in the order in which they were input, but may be later changed by the operator. Show an Obect-Oriented Analysis of this system: a.) Show objects (or classes) for this CAD system and relationships (inheritance) for each object. Also give attributes and operations for each. VERY briefly, describe each. You may use only textual, or diagrams (as used in the text), or a combination but make sure you clearly show each component: operations, attributes, inheritance, etc. b.) Show a flowchart or Nassi-Schneiderman chart to check if a part or all of a line is outside the drawing area (only check if the line is entirely inside (both ends inside), or other (partial or complete)). Return 0 for inside, 1 for other. c.) Where an object has an attribute "color" above, it is advisable not to also include the pallete combination for that color (how much red, green, etc. to add to make that color). What "rule" is this, or why? d.) What should the name of this CAD system be? 3. [ pts] A shoe store has decided to automate record keeping, accounting, etc. for shoes. The shoe store manager has been describing the shoe business to you (the analyst). She tells you that shoes come in womens, mens, boys, and girls, as well as infants (children). Shoes have a size (different scales for different users, ie boys sizes and womens sizes for the same shoe are different numbers). Shoes have a purpose: "sports", "dress", etc. a.) You notice that in reality there is no difference between mens, boys, womens and girls shoes, that they are the same but the "sizing" is different, and the material are different. So you instead organize shoes by size (in mm), material, and "style" (abstract). Is this a good idea, a logical idea? Does it violate any of the analysis or design heuristics (or methods) discussed. If so which, where might this be most best used? 4. [ pts] Short answer: a.) Often finding the right tool (method) for an application can greatly simplify the work. When might a "Decision table" be effective? b.) Factoring (done during design) will usually create module hierarchy that looks quite different than the DFD. What is the relationship between the DFD and the module structure? Where does the data dictionary get used in design? Where does the information flows (arrows) get used in design?