560 likes | 720 Views
Final Presentation. CS673 Software Engineering Dan Spuches Grace Hopkins Craig Cato. Topics. Software Engineering Phases Planning Requirements Design Implementation/Demo Testing End-of-Project Analysis. SE Phase 1 - Planning Choosing the Project. Choosing the Project: Several ideas
E N D
Final Presentation CS673 Software Engineering Dan Spuches Grace Hopkins Craig Cato
Topics Software Engineering Phases • Planning • RequirementsDesign • Implementation/Demo • Testing End-of-Project Analysis
SE Phase 1 - Planning Choosing the Project Choosing the Project: • Several ideas • Curling scheduling system • Recipe collection • Travel and weather tracking system • Weight tracking • Selected YAWP • Yet Another Weight-Tracking Program • According to www.dictionary.com: • yawp (verb) - to utter a loud harsh cry; to yelp, squawk, or bawl
SE Phase 1 - Planning Motivation
SE Phase 1 - Planning Related Work • Google Code • SourceForge BMI Calc iDiet
SE Phase 1 - Planning Related Work • Others All Online WeightCharts WeightWatchers
SE Phase 1 - Planning Related Work • A Close Product Weight Tracker but it only runs on windows... We can be multiplatform with Java
SE Phase 1 - Planning Development Model Choosing a Development Model: • First selection: Waterfall • Second selection: Modified Unified Process Image source: http://upload.wikimedia.org/wikipedia/commons/0/05/Development-iterative.gif
SE Phase 1 - Planning Project Management - Risk Analysis • Lack of experience with tools • Likelihood - 10; Impact - 7; Retirement cost - 3 • Priority - 12 • Retirement plan - Learn tools • Status - Resolved 3/20 • Work limiting team member availability • Likelihood - 4; Impact - 10; Retirement cost - 10 • Priority - 70 • Retirement plan - Close team communication • Status - Active risk for entire project
SE Phase 1 - Planning Project Management - Risk Analysis • Deficient Java skills • Likelihood - 5; Impact - 8; Retirement cost - 7 • Priority - 126 • Retirement plan - Review prior to coding phase • Status - Resolved 3/20 • Overly ambitious scope • Likelihood - 5; Impact - 9; Retirement cost - 1 • Priority - 12 • Retirement plan - Prioritize requirements • Status - Resolved 3/21 with effective prioritization
SE Phase 1 - Planning Project Management - Risk Analysis • Small team • Likelihood - 10; Impact - 5; Retirement cost - 7 • Priority - 42 • Retirement plan - Work together efficiently • Status - Active risk for entire project
SE Phase 1 - Quality Assurance • Quality metrics • Defects per thousand lines of code (KLOC) • Goal - No more than 3 per KLOC • Overly ambitious, but no previous data to base goal on • Time spent per task • Track time on all work effort in minutes • Self assessment on project deliverables • Scale of 1 (poor) to 10 (exceptional) • Defects per document • Goal - No more than 15 defects filed per document
SE Phase 2 - Requirements The Napkin Drawing Getting Started... What we realized: • We have some screens/states. • The lines look like events
SE Phase 2 - Requirements State Transition Diagram
SE Phase 2 - Requirements Use Cases 2.2.1 "User Identification" use case Actor: User of YAWP Use case description: • User enters name to the system. • System determines if user has previously used the system and that their profile exists. • If profile can not be found System gets needed profile information from the User and creates a new profile. 2.2.5 Set Preferences Actor: User of YAWP Use case description: • User selects the Set Preferences option. • System presents the Preferences window with fields for entering data. • User enters data in the fields. • User selects Save Data. • System Saves Data. • Settings take effect immediately.
SE Phase 2 - Requirements Functional Requirements Functional • Create User • Enter Weights • Show Chart(s) • Enter Journal • Set Preferences • Export Data • Change User • Set Data Entry View
SE Phase 2 - Requirements Nonfunctional Requirements • Reliability • YAWP will not fail more than once in 1000 weight entries • Portability & Availability • Run on any PC running Java 1.6 • Windows, Mac, Linux • Usability • Preferences • Any data defined at user creation can be modified at the preferences screen
SE Phase 2 - Requirements Organizing Requirements Each requirement is assigned an identifier 3.2.XX.# XX - GUI component MW - Main Window PW - Preference Window JW - Journal Window CW - Chart Window EW - Enter Weights Window ... # - Requirement number
SE Phase 2 - Requirements Prioritizing Requirements From text page 338: 100 * [T - |T/3 – essential| - |T/3 – desirable| - |T/3 – optional|] / T E=Essential, D=Desirable, O=Optional, T=Total Initial E = 38 D = 8 O = 1 T = 47 100 * [47 - |16 – 38| - | 16 – 8| - |16 – 1| ] / 47 100 * [47 – 22 – 8 – 15] / 47 100 * [2] / 47 = 4.25 % 0 is the worst; 100 is the best. Initial - Revisited E= 29 D = 8 O = 10 T=47 100 * [47 - [|16 - 29| - |16 - 8| - |16 - 10|] / 47 100 * [47 - 13 - 8 - 6] / 47 = 42.56% Final E=33 D=8 O=10 T=51 100 * [51 -[|17 - 33| - |17 - 8| - |17 - 10|] / 51 100 * [51 - 16 - 9 - 7]/51 = 37.25% Ended Fairly Balanced, Still a bit heavy focused on Essentials...
SE Phase 2 - Requirements Requirements Status • Why the change in number of requirements? • Consolidated requirements • Combined change user & new user • Raw data area in weight entry window was integrated into adding weights • Some were no longer needed due to design decisions • Decided to save data when entered instead of on demand • Charts selector window - behavior was integrated into chart window, no need for separate window • No clear button in weight entry window, delete satisfied the behavior
SE Phase 3 - Design Architecture - MVC Model-View-Controller Figure 3-1. “A Common MVC Implementation” from http://www.oracle.com/technetwork/articles/javase/index-142890.html
SE Phase 3 - Design Detailed Design - Design Patterns • Singleton • Database creation • Observer • Messaging/updates between model/view/controller • View observes Model • Controller observes View • Template • Abstraction in Model • WeightEntry & DataEntry • Model & DatabaseModel • Facade • Single interface for View • View manages interactions to individual windows
SE Phase 3 - Design Architecture - Database Third party database interface - SQLite • No installation • No dedicated database server • Integrates with Java • Works on target platforms • Database files are compatible cross-platform • Existed for a while (since 2000) • Large amount of information available on the Internet
SE Phase 3 - Design Architecture - Charts Third party chart interface: JFreeChart • Craig saw it used on another project at work • GNU Lesser General Public Licence (LGPL) • "JFreeChart is a free 100% Java chart library that makes it easy for developers to display professional quality charts in their applications." • Fairly easy to use - way over powered for our use in YAWP
Detailed Design: View + Model Description • Prototype to evaluate JFreeChart and event processing • Observer design pattern to update from the model • When user changes all views update • Leveraging major benefit of the design pattern • View uses Swing ActionListener (an Observer pattern) to manage button presses and similar actions • No Controller registration needed (view only window)
Detailed Design: View + Controller • Controller • Needed due to data changing • Does not directly handle view display • Implements Observer in order to apply business logic to user actions • View • View uses Swing ActionListener (an Observer pattern) to manage button presses and similar actions • Observable (MVC) Higher Level Messages to its observer (aka the controller)
SE Phase 3 - Design Detailed Design - Model • Collection of classes to manage data and pass data between Model, View, and Controller classes • Database (SQLite) part of the Model • Singleton design pattern to limit class loading from jar file and database connection
Transition Grace • Implementation • Testing • Deployment
SE Phase 4 - Implementation Introduction Introduction • Transition from planning to actual code • Implemented in Java using Eclipse IDE • JavaDoc to document methods • Runs on Windows, Mac, Linux
SE Phase 4 - ImplementationCode Organization • Three packages to match MVC
SE Phase 4 - Implementation Third Party Libraries • Third-party libraries • Charting (jcommon and jfreechart) • Database (sqlitejdbc) Import into Eclipse project
SE Phase 4 - Implementation MVC Methods and Notifications
SE Phase 4 - Implementation Demo Demo • Start simple, introduce each window • Preferences. visible / disabled for future • Enter weights (think about how db looks) • Chart - weight and change • Change user • Show interaction • Open chart window for several months, value & change • Open weight window • Delete weight / add weights - highlight changes • Change weight units - highlight changes • Change user - highlight changes
SE Phase 5 - Testing Early Days Early Testing • Prototype Code • Initial Coding • Main method in class • Quick and sufficient for the time being
SE Phase 5 - Testing Unit Testing Unit Testing • More formal approach • JUnit for non-GUI • Getting Started wtih Tdd in Java Using Eclipse • Needed to add some database support • Allowed for quick regression testing • Manual Test for GUI • could not find tool that worked
SE Phase 5 - Testing Integration Testing Integration Testing • Earlier parts of coding, stubs and drivers • As connections were made among the major components, transitioned to top-down testing • For regression testing, each developer ran unit tests and manual UI tests after making changes
SE Phase 5 - Testing System Testing System Testing • As a group, compared final product with Requirements Tracker • Verified the product ran on all three target platforms • CodePro static code analyzer • questionable syntax (= to compare strings) • unnecessary import declarations • comparison with false
SE Phase 5 - Testing Acceptance Testing Acceptance TestingCraig's wife (Deborah) tested • Run 1 (late at night, tired) • Found typo right away • Thought calendar was a calculator • Could not overwrite weight for a date • Issue with focus (select date, should be weight) • Run 2 • Went better • Liked change in weight • Questions about placeholders for future (target weight and height)
SE Phase 5 - Testing Documenting Test Efforts • Software Test Document - not yet • Defect Tracking • Used code.google.com Issues Tracker • 43 Issues Filed
Deployment • Project Hosted http://code.google.com/p/yawp/ • User Manual: http://code.google.com/p/yawp/wiki/UserManual • Single download: http://code.google.com/p/yawp/downloads/list Version 1.0 • JavaDocs • Working on setting up properly in Eclipse to generate files that work on code.google.com
Transition Craig • Tools • Estimations • Metrics • Future • Conclusion
Where are we to Plan Estimate? Estimated Implementation: HoursCode Low: 144 2.88 KLOC High: 288 5.76 KLOC 156 hours 2.98 KLOC
Hours Breakdown General Estimate 15 week x 8 hr = 120 hr
Quality Estimations Defects in Documentation Goal: 15 defects / Document, or 15/1 or 15 Actual: 23/(SPMP, SRS, SDD,...) or 23/3 or 7.7 - but... more defects / clean up / rework coming Defects in Code Goal: 3 defects / 1 KLOC, or 3 Actual: 43 / 2.98 KLOC, or 14.43
Requirement Estimations Requirements Balance Goal: 33 Esential, 8 Desirable, 10 Optional Actual: 32 Essential Met - missed chart type histogram & line- only did line (xy-scatter graph) 5 of 8 Desirable Met 1 of 10 Optional Met