Presentation on theme: "Solutions for Homework Assignment 1"— Presentation transcript:
1Solutions for Homework Assignment 1 Assignment Points: 70Due Date: September 26, 2001Final Date: October 3, 2001Late Penalty: 7 points.
2easier to train staff – only one notation to learn Disadvantages: 1.2. A programming language is a notation for representing algorithms and data structures. List two advantages and two disadvantages of using a programming language as sole notation throughout the development process.Advantages:Developers need only learn one notation for all development activities.Traceability among models and between models since they are written in the same notationcode is made easier since they are written in the same notation as modeleasier to train staff – only one notation to learnDisadvantages:A programming language is a low level notation that is difficult to use for representing user requirements, for example.A programming language enables and encourages developers to represent implementation details too early.5 Points.Deduct 2 points if student fails to give two advantages and two disadvantages. Otherwise, accept any two advantages and disadvantages.
31. 4. What is meant by “knowledge acquisition is nonlinear” 1.4. What is meant by “knowledge acquisition is nonlinear”? Provide a concrete example of knowledge acquisition that illustrates this.Knowledge acquisition is nonlinear in the sense that the acquisition of a new piece of knowledge may invalidate prior knowledge. In other terms, knowing one more piece of information may lead you to realize that what you thought you knew is invalid. For example, Galileo Galilei invalidated the earth centric model of the universe by observing the moons of Jupiter and the phases of Venus.5 Points[Student must get the right idea – that as the project goes on, you learn more about what you didn’t already know, so you suddenly realize that you have more learning to do. Deduct 2 points if student does not have right idea].
4The first requirement is functional. 1.6. Specify which of the following statements are functional requirements and which are nonfunctional requirements: “The ticket distributor must enable a traveler to buy weekly passes.” “The ticket distributor must be written in Java.” “The ticket distributor must be easy to use.”The first requirement is functional.The second requirement is nonfunctional.The third is nonfunctional.5 Points. [-1 for each incorrect answer, -3 points maximum]
5The first decision is a system design decision. 1.7. Specify which of the following decisions were made during requirements or system design: “The ticket distributor is composed of a user interface subsystem, a subsystem for computing tariff, and a network subsystem managing communication with the central computer.” “The ticket distributor will use PowerPC processor chips.” “The ticket distributor provides the traveler with an on-line help.”The first decision is a system design decision.The second decision is also a system design decision if made by developers (otherwise, it is a requirements decision).The third decision is a requirements decision.5 Points. [-1 for each incorrect answer, -3 points maximum]
6Bridges and aircraft are sometimes delivered late too. 1.9. A passenger aircraft is composed of several millions of individual parts and requires thousands of persons to assemble. A four-lane highway bridge is another example of complexity. The first version of Word for Windows, a word processor released by Microsoft in November 1989, required 55 person-years, resulted into 249,000 lines of source code, and was delivered 4 years late. Aircraft and highway bridges are usually delivered on time and below budget, whereas software is often not. Discuss what are, in your opinion, the differences between developing an aircraft, a bridge, and a word processor, which would cause this situation.To estimate the budget and schedule for a new bridge or aircraft, engineers use actual data from previous bridges and aircraft. Word for Windows was an innovative piece of software with few or no precedents.Many bridges and aircraft are simply refinements of other existing artifacts. This reduces the proportion of the overall effort that is dedicated to design (which is the most difficult to estimate).Bridges and aircraft are often associated with severe financial penalties when late or over budget.Bridges and aircraft have safety requirements associated with them. This leads to a conservative approach to development including the use of mature technologies and well defined processes.Bridges and aircraft are sometimes delivered late too.10 Points.[If student gives ANY 2 (or more reasons), they get 9 points. If they give one reason (any reason), they get 8 points. If they give 2 or more reasons and at least one reason is from list below, they get full credit. If they give two or more from below, they get full credit AND write “VERY GOOD!).
72.1. Draw a use case diagram for a ticket distributor for a train system. The system includes two actors: a traveler, who purchases different types of tickets, and a central computer system, which maintains a reference database for the tariff. Use cases should include: BuyOneWayTicket, BuyWeeklyCard, BuyMonthlyCard, UpdateTariff. Also include the following exceptional cases: Time-Out (i.e., traveler took too long to insert the right amount), TransactionAborted (i.e., traveler selected the cancel button without completing the transaction), DistributorOutOfChange, and DistributorOutOfPaper.10 Points.This question can have several correct answers, The figure above is a good answer. The following elements should be present:Must use correct symbols for actors (stick figure) and use cases (oval) [-1, one time deduction]The relationship between an actor and a use case is a communication relationship (undirected solid line). [-1, one time deduction]The relationship between exceptional use cases and common use cases is an <<extend>> relationship. [-1, one time deduction]The exceptional use cases described in the exercise only apply to the use cases invoked by the traveler. [-1, one time deduction]All exceptions apply to all traveler use cases. Instead of drawing 3x4 relationships between these use cases, an abstract use case from which the exceptional use case inherit can be used, thus reducing the number of <<extend>> relationships to3 at the cost of introducing 4 generalization relationships [-1].
82.3. Draw an object diagram representing the first part of this book (i.e., Part I, Getting Started). Make sure that the object diagram you draw is consistent with the class diagram of Exercise 2.2..10 pointsObjects of the four classes Book, Part, Chapter, and Section must be present. [-2 points if any class is missing – Note. Deduct 2 points only once!)Objects are represented with rectangles and underlined labels. [-1, one time deduction]The class of an object is included in the label of the object (e.g., uml:Chapter is of class Chapter). [-1, one time deduction]Links are represented with solid lines [-1, one time deduction]
92.6. Draw a sequence diagram for the warehouseOnFire scenario of Figure 2-17 on page 42 in the book. Include the objects bob, alice, john, FRIEND, and instances of other classes you may need. Draw only the first five message sends.10 PointsThis exercise can have several correct answers. In addition to the UML rules on sequence diagrams, all correct sequence diagrams for this exercise should include:Correct UML syntax for sequence diagrams: Actors (stick figures), Activations (vertical rectangles), Life-lines (vertical dashed lines) [ -1, one time deduction]one or more actors on the left of the diagram who initiate the scenario [-1]one or more objects in the center of the diagram which represent the system [-1]a dispatcher actor on the right of the diagram who is notified of the emergency. [-1]All actors and objects should be instances. [-1]Messages sent between instances are correct. [-1]
102.8. Consider the software development activities which we described in Section 1.4 on page 14 in the book. Draw an activity diagram depicting these activities, assuming they are executed strictly sequentially. Draw a second activity diagram depicting the same activities occurring incrementally (i.e., one part of the system is analyzed, designed, implemented, and tested completely before the next part of the system is developed). Draw a third activity diagram depicting the same activities occurring concurrently.10 Points.This exercise tests the student’s knowledge of the activity diagram syntax, not the knowledge of software engineering activities. In the sample solution we assume that requirements elicitation needs to be completed before any subsystem decomposition can be done.A correct answer will include:3 diagrams (sequential, Incremental, and Concurrent) [-3 for each missing diagram]Each diagram should show 5 activities [-1 for any activity missing]Correct diagram syntax (rounded rectangle for activity, solid line with arrow for flow [-1 one time only for a syntax error. But do deduct for two different kinds of syntax error, for example, dotted lines or not-oval are separate deductions]Diagrams that include requirements in incremental or concurrent flows will not be penalized.