Download presentation
Presentation is loading. Please wait.
Published byJustin Haynes Modified over 8 years ago
1
ABT1/GUT1/KFT1 Task 4 Prep Diagrams for MediaManager Cynthia Lang, PE, MSChE Pubali Banerjee, PhD IT Course Mentors-Java Assessments
2
Tools for Task 4 Documentation Visual Paradigm You can also use PowerPoint for the diagrams. Other tools, both free and premium, can be used. http://www.visual-paradigm.com/download/vpuml.jsp?edition=ce
3
Diagrams Required for Task 4 Use Case Class Sequence
4
Use Case Diagrams Where are Use Case Diagrams used in the software life cycle? AnalysisDesignImplementationTestingDeployment Use CaseTechnical Documents Source Code Test ResultSign Off
5
What is MediaManager? MediaManager was developed by Pubali Banerjee to illustrate syntax and concepts required to complete Task 4. It is loosely based on the DVD logger activity in the COS. The code for MediaManager can be found here: http://bit.ly/V2N3jrhttp://bit.ly/V2N3jr The application is for a user who would like to maintain a database of media using a Java program. Like Task 4, it has an abstract superclass, media, and concrete subclasses, vhs and dvd. Also like Task 4, it is the front end for a MySQL database.
6
Use Case Diagrams required Document the functional requirements with UML use case diagrams for each requirement. For each functional requirement provide the following: Requirement number and title Description of the functionality Input Results of processing or output Error handling or recovering requirements outlined UML use case diagrams
7
MediaManager Functional Requirements 1) The database has a table called media with 6 fields. 2) The database can be created and populated by running the script media.sql. 3) The Connect class handles database connections. 4) There is an abstract super class called media. 5) The media class has several abstract methods. 6) The querybyid() method queries the db for info on a media by id. 7) The add() method adds a media information to the database. 8) The calcCost() gets the total cost (including shipping) for a media. 9) The toString method is overridden in media to display all the data variables in media concatenated in a string. 10) The dvd and vhs are subclasses inherited from media. 11) The dvd subclass has two attributes called 'blueray' and dvdshippingcost which are exclusive to this class 12) The dvd subclass has a flat shipping cost of $2.99 which is added to the price of the DVD. 13) For VHS, the total cost (including shipping) is $20.00 flat. 14) The mediaManager class is the tester class.
8
Use Case Diagram for MediaManager Media Collector Add media List all media Find media by ID Calculate total cost Database MediaManager Add vhs Add dvd Find vhs by ID Find DVD by ID Calculate vhs total cost Calculate dvd total cost
9
Use Case Diagram for MediaManager Add media functional requirement Media Collector Add media Database MediaManager Add vhs Add dvd Requirement number: 1 Title: Add media Description: The media collector will add media to the collection database. The media will be either vhs or dvd. Input: To add a vhs, the user/media collector will enter mediaID, title, year, cost, type. To add a dvd, the user/media collector will enter the same plus blueray. Results of process or output: The media is added to the database, and the message: “Successfully added media to the database” is displayed. Error handling: The message: “"Could not insert“ is displayed.
10
What are Use Case and Class Diagrams? http://www.youtube.com/watch?v=UOlUhem3zRI&list=PL1BDC7092208 24BE1&index=8&feature=plpp_video
11
Class Diagrams Comprehensive Class Diagrams: Show all classes and all relationships among all classes. These should include the following: – Relationships: Your object oriented design will require you to diagram all class relationships using correct UML 2.0 Modeling notation which minimally includes: Inheritance Association Relationships –Multiplicity: Note any multiplicity in the relationships (e.g., 1-1, 1-many, etc.) using correct UML 2.0 Modeling notation. –Attributes: For each class, all attributes with types (e.g., int, double, etc.) and access control (e.g., private, public, protected) need to be noted using proper UML 2.0 Modeling notation. –Methods: Methods with signatures and access control should be provided. All methods have to be indicated, including all constructors, setters, and getters. –Abstract Classes and Interfaces: Any abstract classes and interfaces used in your design must be properly indicated using UML 2.0 Modeling notation.
12
Class Diagram for MediaManager > Media -mediaID: Integer -title String -year String -cost double -type String +Media() +setmediaID(SID:Integer):void +setTitle(Title:String):void +setYear(Year:String):void +setCost(Cost:double):void +setType(Type:String):void +getmediaID():Integer +getTitle():String +getYear():String +getCost():double +getType():String +add():void +querybyid():void +calcCost(mid:int):double +toString():String VHS +VHS() +setCost(c:double):void +add():void +querybyid():void +calcCost(mid:int):double +toString():String DVD -dvdshipcost:double -bluray String +DVD() +setBluray(c:String):void +getBluray():String +add():void +querybyid():void +calcCost(mid:int):double +toString():String MediaManager -swValue: Integer -menuint Scanner -year String -cost double -type String +main() +AddMedia():void +QueryMedia():void +QueryMediabyID():void +calCost():void 11..* 0..* Connect -conn Connection +Connect() +makeConnection():Connection +makeStatement():Statement +close():int 10..1 1 1
13
What is a Sequence Diagram? https://www.youtube.com/watch?v=4WDbte6cPa8
14
Sequence Diagram – Add VHS MediaManagerMediaVHSDatabase Media Collector Start program. Show menu. Select Add. Request ID, title, cost, type of media. Supply ID, title, cost, type of media. Create a VHS Object Insert VHS in database Call Media constructor Constructor info Return success message
15
Java COS Mentors Cynthia Lang, PE, MSChE cynthia.lang@wgu.edu Pubali Banerjee, PhD pubali.banerjee@wgu.edu
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.