Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vladimir Misic: Design111:43:34 AM Software design.

Similar presentations


Presentation on theme: "Vladimir Misic: Design111:43:34 AM Software design."— Presentation transcript:

1 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design111:43:34 AM Software design

2 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design211:43:34 AM Code Size Program/ApplicationLines of Code Solaris 7400,000 Linux1.5 million Windows 95Under 5 million NT535 million Boeing 7777 million Space Shuttle10 million Space Station40 million Netscape17 million

3 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design311:43:34 AM Disasters 7 deaths of cancer patients were due to overdoses of radiation resulting from a race condition between concurrent tasks in the Therac-25 software. The 1988 shooting down of the Airbus 320 by the US Vicennes was attributed to the cryptic and misleading output displayed by the tracking software. An American Airlines plane crashed into a mountain because the pilot entered an incorrect one letter command that sent the plane into a mountain. An Iraqi scud missile hit Dhahran barracks, leaving 28 dead and 98 wounded. The incoming missile was not detected by the patriot defenses, whose clock had drifted.36 seconds during the 4-day continuous siege.

4 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design411:43:34 AM So What Does All This Mean? Seat of your pants programming may work here, but it won’t cut it in industry!! There is an urgent need for techniques that can be used to manage the development of large software systems This is part of what software engineering is all about

5 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design511:43:34 AM Software Quality Correctness Robustness Extendibility Portability Ease of use Functionality Timeliness Product quality is a measure how well a product meets given criteria. Here is a list of external factors for software quality * : 8 Source: Bertrand Meyer, ``Object-Oriented Software Construction'', Chapter 1. ? A lot of… blah-blah, but, what does it actually mean?

6 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design611:43:34 AM Software Quality Correctness: –Correctness is the ability of software products to perform their exact tasks, as defined by their specification. Robustness: –Robustness is the ability of software system to react appropriately to abnormal conditions. Extendibility: –Extendibility is the ease of adapting software products to changes of specification. Product quality is a measure how well a product meets given criteria. Here is a list of external factors for software quality * : 8 Source: Bertrand Meyer, ``Object-Oriented Software Construction'', Chapter 1.

7 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design711:43:34 AM Software Quality Reusability: –Reusability is the ability of software elements to serve for the construction of many different applications. Compatibility: –Compatibility is the ease of combining software elements with others. Efficiency: –Efficiency is the ability of a software system to place as few demands as possible on hardware resources, such as processor time, space occupied in internal and external memories, bandwidth used in communication devices. … external factors for software quality: 8 Source: Bertrand Meyer, ``Object-Oriented Software Construction'', Chapter 1.

8 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design811:43:34 AM Software Quality Portability: –Portability is the ease of transferring software products to various hardware and software environments. Ease of use: –Ease of use is the ease with which people of various backgrounds and qualifications can learn to use software products and apply them to solve problems. It also covers the ease of installation, operation and monitoring. Functionality: –Functionality is the extent of possibilities provided by a system. Timeliness: –Timeliness is the ability of a system to be released when or before its users want it. … external factors for software quality: 8 Source: Bertrand Meyer, ``Object-Oriented Software Construction'', Chapter 1.

9 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design911:43:34 AM The Software Life Cycle Requirements and/or analysis –Determine and spell out the details of the problem Design –Determine how to solve the problem Coding –Translate the design into the actual system. Testing –Verify that the program solves the problem –Verify that the requirements have been satisfied –Verify that the system works properly Maintenance –Bug fixes

10 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1011:43:34 AM Waterfall Model Requirements/Analysis Design Coding Testing Maintenance These should be done sequentially. However, at any point you may discover a flaw (or the requirements may have been changed) and find you need to change a prior step.

11 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1111:43:34 AM Documents The work done in each stage is typically summarized in a document –Requirements document A description of what the customers and users expect the system to do –Specifications A detail description of how the software system will behave –Design A description of the various components in the system and how they will interact

12 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1211:43:34 AM Requirements Document The initial step is to determine what the system must do. –The Requirements Document is developed to document the customer’s and user’s expectations of the software. Requires data and potentially interaction with the customer and actual users. Requirements document Specifications Design

13 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1311:43:34 AM Requirements Once the team has an understanding of the requirements the next step is to determine how the system will behave. –The result of this step is the Functional Specification Document. –This document contains: How the system operates The user interface look and feel The system input and outputs Error handling Requirements document Specifications Design

14 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1411:43:34 AM Design Specification After the team understands how the system will behave, the next step is to determine how to implement the system. –The result of this step is the Design Document. Requirements document Specifications Design

15 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1511:43:34 AM Design Specification The design document contains: –The class organization. –The classes and instance variables. –The methods with specific return type and parameters –Any complex algorithms

16 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1611:43:34 AM From Specification to Design There are multiple approaches to developing the design. The following represent some good steps to take when developing a design (more like: 8 steps) 1)Find the possible objects: Look for noun phrases that represent objects. Nouns phrases may either be objects or state Look for key components in the requirements and specification documents.

17 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1711:43:34 AM From Specification to Design 2)Find the possible methods: Look for actions that identify behaviors. Look for verb phrases in the requirements and functional specification. 3)Identify the possible classes: Define classes that represent objects. Try to group nouns into classes if they represent a more general entity. Remove duplicate and extraneous nouns.

18 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1811:43:34 AM From Specification to Design 4)Write a statement that describes the purpose of each class that has been identified. Group nouns together that represent a more general entity What are the behaviors of this class and what will they do. 5)Determine the class structure. Put logically connected state and behaviors into the same class. If a behavior requires an attribute of a class, put the behavior in the same class.

19 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design1911:43:34 AM From Specification to Design 6)Define the communication and relationships between classes (collaboration). Does a class require information from another class to perform the defined behaviors? Discard classes that do not interact with other classes. They most likely are not needed.

20 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design2011:43:34 AM From Specification to Design 7)Refine the system design Review classes to see if they should be combined. Review collaborations between classes to see if they can be defined in a more streamlined manner. 8)Prepare a class diagram. Unified Modeling Language (UML)

21 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design2111:43:34 AM Implementation Once the design is “complete” the implementation begins.

22 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design2211:43:34 AM Testing The testing phase should begin as soon as there is any reasonable implementation to verify. –The first step is to develop test cases. –The second step is to run the test cases. –The third step is to report any problems back to the programmers. –We will talk more about testing in a few days.

23 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design2311:43:34 AM Design Example Develop a system that will convert US dollars to Japanese Yen, Euros, or Chinese Yuan. The user enters an amount and a currency for the conversion. The output should list the entered amount in US dollars followed by the converted amount with the currency name. If the user enters a currency that does not exist, a proper error message should be printed.

24 Vladimir Misic: vm@cs.rit.edu http://www.cs.rit.edu/~vm Design2411:43:34 AM Converter class Converter { // Class Variables: private static … // Instance Variables: // Class methods: public static … // Constructors: public Converter( ) // Methods : public … private … } class Converter { // Class Variables: private static … // Instance Variables: // Class methods: public static … // Constructors: public Converter( ) // Methods : public … private … }


Download ppt "Vladimir Misic: Design111:43:34 AM Software design."

Similar presentations


Ads by Google