Advanced Software Engineering
Advanced Software Engineering CS 430
Popular in Course
Popular in ComputerScienence
This 20 page Class Notes was uploaded by Abe Jones on Saturday September 12, 2015. The Class Notes belongs to CS 430 at West Virginia University taught by Bojan Cukic in Fall. Since its upload, it has received 20 views. For similar materials see /class/202752/cs-430-west-virginia-university in ComputerScienence at West Virginia University.
Reviews for Advanced Software Engineering
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/12/15
So ware Engineering A Practitioner39s Approach 6e WVU LDCSEE CS 430 Fa mumm m m R s Piessman K Assumales lnc Fnrunmrs yuse only induced ONLV Yuis1ud2nt use atthe unweislv level nctmn with Soilware Engineering A Practitioner sllpproacn AW uthevamuductmn muse lsewiesslv pmhblted Mav be yen when used in cumu M ya man Analysis Model gt Design Model m m A i W Design and Quality l the design must implement all of the explicit requirements contained in the analysis model and it ust accommodate all ofthe implicit requirements desired by the customer the design must be a readable understandable guide for e who generate code and for those who test and subsequently support the soltware the design should provide a complete picture of the soltware addressing the data functional and behavioral domains 39om an implementation perspective M ya man Quality Guidelines A design shuuid Exhibit ah architecmre that 1 has been created using rEEngZabiE architecturai styies er patterns 2 is umpused er cempehehts that Exhibit gene design characteristics and a can be impiEmEntEd th ah Evuiu unaryfashmn Fm smaiievSsmms design can sumeiimesbe deveiuped hneaviv arrhrterrure rhterrare ahrt cempehehts A design shuuid ieadtu eata structuresthat are apprephateterthe iasses te be impiEmEntEd and are drawn trerh rEEngZabiE eata patterns A design shuuid ieadtu cempehehts that Exhibitindependemmn mnai charactehsncs A destg untamed during sertware requirements anaiysis Nearing Design Principles Fundamental Concepts abstractronajata procedure controi architectureime overaH structure of the software attemsi conveys the essence of a proveh deSign Soiution rh duiarityicompanmentahzauon of data andfuncuon hidingicomroiied htertaces Functionai independencsmgiermmded tuhctron and iow couphng e nementieiaboration or detau tor aH abstractrons Refactormgia reorgamzatron techhrque that srrhphhes the desrgh Data Abstraction manufadurer modei number type SWm diredion e 5 mber Weight opemng mechanism impiemented as a data structure Procedural Abstraction open detaiis of enter aigonmm gt impiemented with a knowiedge of me omect that i5 associated With enter a mm a i Architecture The overall structure orthe software and the whi h that structure provides conceptual integrity fora 95 1 c system SHA a sin V w W Pattern 5 Design Pattern Template Inwnkdescnbes the pattern and what R does Alsoknownas llsts any synonyms for the pattern Motlvatlon promdes an example of the problem swucture descnbes the classes that are requlred to Implement the pattern Iquot plement the pattern collaporanons descnbes how the pamclpants collaborate to carry out their responslbllmes conseque es u 9 potentlal tradeolrs that must be consldered when the pattern IS Implemented Related pattens crossreterences related deslgn patterns we a pm Modular Design easier to build easier to change easier to x m u l we a pm Modularity Tradeoffs wnatls the quotrightquot numberof modules for a specific software design module developmentcost opumal number of modules Information Hiding clients Why Information Hiding I reduces the likelihood of side effects I limits the global impact oflocal design decisions I emp asi es communication through controlled interfaces I discourages the use of global data I leads to encapsulation an attribute of high quality design I results in higher quality software Stepwise Refinement repeat unm door opens turn knob clockwise rr moo doesn uurn then take key out nno correct key lngert rn locK en r pullpusn ooor move out or may end repeat Functional Independence COHESION the degree to which a module performs one and only one COUPLING the degree to which a module is quotconnectedquot to other modules in the system Sizing Modules Two Views Refactoring l Fowler FOW99 de nes refactoring in the ollowing manner39 Reractonnglstn systern ln s oenaylor or structure I When so ware is refactored the existing design is examined for e process orcnanglng a sortware ucn a Way tnat lt does not altertne external tne code deslgnl yet lrnoroyes lts lnternal unused deslgn elernents lnemclent or unnecessary al ontnrns poorly constructed or lnaooroonate data stmctures or any otner deslgn rallure tnat can be corrected to yleld a oetterdeslgn 00 Design Concepts Desrgn dasses a ses l Cumruuerctasses nherttanceiaH responsrbrntres of a superdass rs rrnrnedratety rnnented by 5 subdasses orne Denator to occur rn tne Messagesis39t rnutate s receryrng obrect Potymorpmsm aractenstrc tnat greatty reduces tne errort reourred to extend tne desrgn me a Pracm 1Q Deslgn Classes Anatysrs dasses are renned dunng desrgn to becorne entrty ta es Boundary dasses are deyetobed dur ng desrgn to create tne rnterface e g rnteractrye screen or prrnted reports tnat tne user sees and mteracts thh as the software ts used Boundary masses are desrgned wrtntne responsrbrnty or rnanagrng the Way Emmy ElbjEEIS are represermed El users e creatron orupdate otentrty abject tne rnstannatron or boundary obrects as tney obtarn rnrorrnatronrrorn ennty abject cornptex cornrnunrcatron between sets ufubjects vandanun or data cornrnunrcated between obrects urbetween tne userandtne appncatron me a Pracm m Inheritance I Design options Tne ctass can be desrgned and bunt from scratcn Tnat s rnnerrtance rs not used Tn nrerarcny c n be searcned to deterrnrne rt a ctass nrgnerrn tne nrerarcny a superctasscontarns rnost of e requrred attrrbutes and operatrons The new ctass rnnerrts from tne superctass and addrtrons rnay tnen be adde y as requrred Tne ctass nrerarcny can be restructured so tnat tne requrred ttrrbutes and operatrons n be rnnented bytne new ctass cnaracterrstrcs of an extstmg ctass can be oyerrrdden and drtrerent yersrons of attrrbutes or operatrons are rrnpternented for a Q m the new Cass me a Pracm 21 Messages massapagpmmgus Wm Polymorphism Conventional approach case of graphwpe If graphth inegraph then DrawLinecraph toatai e hen DrawPiechart toatai stograni then Dralesm mam iviatthen DrawKiviat toatai Ir graphth Ir graphth Ir graphth end case All of ora 39 rrAYwi orthe objects instantiated from any one orthe subclasses The object receiving the message will invoke its own drawoperation to create the appropriate graph graphwpe draw The Design Model canlglmm aicmteduie mm Gunmaner deviavmen wei eiemems eiemems eiemems eiemems process on m a pm Design Model Elements Daaelemems Data mudel data stmctuves Data made database arcmtecluve Arcmtecturaleleme Apphcatmndumam Analvslsclassesthewvelatmnsmps cullebuvatmnsandbehavmvsave uanmmee mlu deslun veahzalluns Pa emsand 5lles 0haptevlm lnterface Elements lheusenmenacew extemal mte aceslu mew512m meme HENmks m umev pvuducevs m cunsumers m mluvmatmn mlemal mlenaces between vanuus deslun cumpunems Cumpunentelements Depluymentelements Interface Elements m quotas elem mnals ch 5 e am an mm wlhvemlssnn w 5 nemnme Component Elements SensavManivement Deployment Elements nest stem mu wlhvemlssnn m 5 pr m mm Design Patterns create a solution A descnptron or a desrgn pattern may also consrder a set or desrgn forces Desrgn forces describe nunrmnctiunai requrrements e 9 Ease pr maintainability punabmty assuciated the suftware fDrWhiEh the pattern is El be applied r n n ihilm mdrcate the attnputes orthe desrgn that may be adrusted to enable the pattern to accommodate a variety or problems Frameworks A framework is not an architectural pattern but rather a skeleton with a collection of plug pointsquot also called hooks and slots that enable it to be adapted to a speci c problem domain I Gamma et aI note that Desrgn patterns are more abstract than framew rtlt Desrgn patterns are smaller architectural elements than frameworks Desrgn patterns are less specrahzed than frameworks MMDS Software Application SOFTWARE DESIGN SPECIFICATION 10 Introduction This Software Design Speci cation SDS describes system design for The Magnetic Resonance Imaging Motion Detection System MMDS Software Application 11 Background Motion ofthe subject during an MRI scan can cause the image to contain distortions or artifacts The MMDS application seeks to develop a way to easily inform the MRI operator and subject in real time when nontrivial motion has occurred The MMDS application will do this by interfacing with the MMDS Hardware to Software Interface The MMDS application will act on a synchronized schedule with the MRI in orderto provide accurate information regarding motion vs time for the duration of the MRI scan The operator will be informed of nontrivial motion through a visual alarm shown in the MMDS application The subject will be alerted from an audible alarm through triggered by the MMDS application 12 Statement of scope The MMDS Software Design Speci cation SDS focuses on the functional and technical design forthe MMDS Application This includes the Communications the Graphical User Interface GUI and the Sound Manager 13 Major constraints The MMDS Application will need to be designed to work on major operating systems V ndows Mac Linux The biggest constraint observed by the MMDS Application will be the need to alert the users in real time when nontrivial motion has occurred 20 Data design A description of all data structures including internal global and temporary data structures 21 Internal software data structure 2 1 1 RS232 ASCII String RS232 ASCII Strings will be strings that are read from the Serial Port These Strings will be parsed into ChannelDataObjects The string will be in the following format 5 V1 V2 TM1 TM2 T81 T82 TmS1 TmS2 ch X Where s and X are delimiting characters V1 and V2 represent hexadecimal voltage values TM1 and TM2 represent minutes TS1 and T82 represent seconds and TmS1 and TmSZ represent milliseconds 2 12 ChannelDataObject ChannelDataObjects are used to represent information sent from the MMDS Hardware to Software Interface over a RS232 interface They will contain the following information Voltage Level Time Source Channel and Voltage Threshold 2 13 UdpFIag A UdpFIag is simply a bit representing a boolean ag value The UdpFIag will represent weather or not current motion is trivial or nontrivial This data is sent from a 3rd party application that determines if motion at the current time in the scan is trivial or non trivial 30 Architectural and componentlevel design A description of the program architecture is presented 31 Program Structure MMDS will follow an Object oriented approach to design We mode MMDS with a component level architectural design This system will be implemented using the Java programming language MMDS will make use of the Observer Design Pattern This pattern is used to implement a distributed event handling system In our case the Observer classes will observe SerialCommSubject and UdpExternalMotionSubject Whenever a new ChannelDataObject or a UdpFlag is created they will be sent to the Observers via the Observer Pattern 311 Architecture diagram ChannelDalaODiecl GmODservei 312 Alternatives We chose to use a component level architecture design because it would map to object oriented implementation easily 32 Description for Component SerialCommSubject SerialCommSubject is responsible for all aspects of serial communication throughout MMDS 321 Processing narrative PSPEC for component SerialCommSubject Once prompted by the user SerialCommSubject begins polling the serial port for RS232 Strings Once a string is received it is passed to CdoUtils so that it can be serialized into a ChannelDataObject These ChannelDataObjects are then passed on to all registered observers SerialCommSubject will make use ofthe 3rd Part Library thx to simplify RS232 Communication 322 Component SerialCommSubject interface description Inputs RS232 Strings Outputs ChannelDataObjects 33 Description for Component MCUCommSim This component is used strictly to test MMDS MCUCommSim is used to simulate the Hardware to Software Interface of MMDS It will be run from another computer connected over RS232 interface 331 Processing narrative PSPEC for component MCUCommSim Once prompted by the user MCUCommSim will begin sending RS 232 Strings across the serial port The user can specify the number of strings to be sent as well as the timing between each data transmission 332 Component MCUCommSim interface description Inputs Operator Event Outputs RS232 Strings 34 Description for Component SoundAlarm Sound alarm is used to play sound through the PC Sound card when a ChannelDataObject is produced that is above the threshold and a UdpFIag is true 341 Processing narrative PSPEC for component SoundAlarm When MMDS starts a wav file is loaded into memory When the GuiObserver receives a ChannelDataObject with a Voltage Level that is above the threshold and the UdpFIag is true a wav file is played 342 Component SoundAlarm interface description Inputs ChannelDataObject Outputs Sound played through PC speaker 35 Description for Component CdoUtils CdoUtils is a collection of utility methods relating to ChannelDataObjects 351 Processing narrative PSPEC for component CdoUtils CdoUtils serves two main purposes The first is used by SerialCommSubject to serialize RS232 Strings into ChannelDataObjects The second is used by MCUCommSim to create random ChannelDataObjects for use in testing 352 Component CdoUtils interface description Inputs RS232 Strings Outputs ChannelDataObjects 36 Description for Component ChannelDataObject ChannelDataObjects are used to represent information sent from the MMDS Hardware to Software Interface over a RS232 interface They contain the following information Voltage Level Time Source Channel and Voltage Threshold 361 Processing narrative PSPEC for component ChanelDataObject ChannelDataObjects are created from RS232 Strings by CdoUtils 362 Component ChannelDataObject interface description Inputs setVoltage setChannel setThreshold setTime Outputs getVoltage getChannel getThreshold getTlme 37 Description for Component GuiObserver GuiObserver is as a conduit for ChannelDataObjects and UdpFlags to trigger audible and visual alarms 371 Processing narrative PSPEC for component GuiObserver GuiObserver is used to store ChannelDataObjects into a thread safe collection It also stores UdpFlags in a thread safe collection If it nds a condition where a UdpFlag is true and a ChannelDataObject s Voltage Level is above the threshold it will cause an alarm to be thrown to the GuiManager and SoundAlarm 372 Component GuiObserver interface description Inputs ChannelDataObject UdpFlag Outputs Visual Alarm Audible Alarm 38 Description for Component GuiManager GuiManager is used to create and show the Gui on the screen It is the main entry point for the operator 381 Processing narrative PSPEC for component GuiManager GuiManager will use Java Swing components to display the Gui on the operator s screen This component will contain a Text area that will display ChannelDataObjects in real time The operator can invoke or terminate a scan that will start or stop SerialCommSubject from polling the serial port The operator can also load a previous scan s data 382 Component GuiManager interface description Inputs Operator mouse and keyboard events Outputs ChannelDataObject information in human readable format 39 Description for Component UdpExternalMotionSubject UdpExternalMotionSubject is responsible for opening and continuously polling an Udp port to listen for UdpFlags 391 Processing narrative PSPEC for component UdpExternalMotionSubject UdpExternalMotionSubject will continuously monitor Udp port 8899 for a flag sent by a third party program This flag represents weather or not motion at the current time during a scan is trivial or nontrivial These flags are then sent to the GuiObserver 392 Component UdpExternalMotionSubject interface description Inputs Udp packet Outputs UdpFlag 310 Description for Component FileLoggerObserver FileLoggerObserver will log all ChannelDataObjects and UdpFlags for a given scan 3101 Processing narrative PSPEC for component FileLoggerObserver FileLoggerObserver will create a unique file at the beginning of each scan It will then store all ChanelDataObjects and UdpFlags for that scan in the file They will be in text format 3102 Component FileLoggerObserver interface description Inputs ChannelDataObjects UdpFlags Outputs File containing all ChannelDataObjects and UdpFlags for a given scan 311 Software Interface Description The software interfacesto the outside world isare described 3111 External machine interfaces This application will be connected to a Freescale HCS12 Microcontroller Unit MCU through a RS232 interface DB9 Connector This MCU is part ofthe MMDS Hardware to Software Interface that converts TTL level voltages to RS232 voltages and marks them with a timestamp and channel data 3112 External system interfaces This application will be exposing UDP port 8899 to listen for data regarding nontrivial motion This interface is exposed to listen for data sent from another program written to determine exact times during an MRI scan when motion will cause image artifacts 40 User interface design A description ottne user interface design ottne software is presented 41 Description ortne user interface Tne user interface is puiit using Java s sWing Components MMDS uses David Ekhoim s RiverLayoUt as a Layout Manager 411 Screen images Clunnll mu imEm5 cnannei uniiauem Naim 412 Objects and actions TextArea Used to dispiay ChanneiDataObiectsvoitage time and cnannei data Stan Scan Button Used to cause MMDS to start scanning seriai port Stop Scan Button Used to cause MMDS to stop scanning seriai port View Log Button Used to ioad a previous scan s data 50 Testing Issues Test strategy and preliminary test case specification are presented in this section 51 Classes of tests 511 Timing The MMDS will be tested using the MCUCommSim Component MCUCommSim will send RS232 Strings Emphasis will be placed on both highspeed data and varying time intervals 512 Image Artifacts Images generated from the MRI will undergo separate performance evaluation This will involve measuring the standard deviation of groups of pixels along the borders ofthe images 52 Expected software response 521 Timing MMDS is expected to experience some sort of delay from the time a ChannelDataObject is created to when it is displayed to the Operator It is expected that after a 5 minute scan the delay will be no longer than 1 second 522 Timing The standard deviation ofthe pixels on the borders of the image should be lower than images with known motion artifacts 53 Performance bounds The audible and visual alarm should be available within 1 second afterthe RS232 String is sent to the serial port 60 Appendices Presents information that supplements the design speci cation 61 Packaging and installation issues Project will be packaged into a single jar using Apache Ant
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'