ABT1/GUT1/KFT1 Task 4 Prep Diagrams for MediaManager Cynthia Lang, PE, MSChE Pubali Banerjee, PhD IT Course Mentors-Java Assessments.

Slides:



Advertisements
Similar presentations
Final and Abstract Classes
Advertisements

PHP and MySQL Database. Connecting to MySQL Note: you need to make sure that you have MySQL software properly installed on your computer before you attempt.
Data Structures Lecture 2 Fang Yu Department of Management Information Systems National Chengchi University Fall 2011.
Module 8 “Polymorphism and Inheritance”. Outline Understanding Inheritance Inheritance Diagrams Constructors in Derived Classes Type Compatibility Polymorphism.
Inheritance Inheritance Reserved word protected Reserved word super
Liang,Introduction to Java Programming,revised by Dai-kaiyu 1 Chapter 10 Object-Oriented Modeling.
Inheritance. Extending Classes It’s possible to create a class by using another as a starting point  i.e. Start with the original class then add methods,
1 Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 8.1 – 8.5.
CSM-Java Programming-I Spring,2005 Fundamental Data Types Lesson - 2.
1 Chapter 6 Inheritance, Interfaces, and Abstract Classes.
Advanced Object-Oriented Programming Features
1 Evan Korth New York University Inheritance and Polymorphism Professor Evan Korth New York University.
CPSC150 Interfaces Chapter CPSC150 Inheritance Review No different than any other class. Has no access to or information about subclasses class.
1 Evan Korth New York University Inheritance and Polymorphism Professor Evan Korth New York University.
Chapter 10 Classes Continued
Abstract Classes and Interfaces
Chapter 7 - Generalization/Specialization and Inheritance1 Chapter 7 Generalization/Specialization and Inheritance.
C++ fundamentals.
Chapter 10: Inheritance 1. Inheritance  Inheritance allows a software developer to derive a new class from an existing one  The existing class is called.
Object-Oriented Analysis and Design
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Object Oriented Software Development
Chapter 6 Class Inheritance F Superclasses and Subclasses F Keywords: super F Overriding methods F The Object Class F Modifiers: protected, final and abstract.
MIT AITI 2002 Abstract Classes, Interfaces. Abstract Classes What is an abstract class? An abstract class is a class in which one or more methods is declared,
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
CISC6795: Spring Object-Oriented Programming: Polymorphism.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
Inheritance and Class Hierarchies Ellen Walker CPSC 201 Data Structures Hiram College.
1 Object-Oriented Software Engineering CS Interfaces Interfaces are contracts Contracts between software groups Defines how software interacts with.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
What is inheritance? It is the ability to create a new class from an existing class.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Systems Analysis and Design in a Changing World, 3rd Edition
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Applications Development
CS 151: Object-Oriented Design September 5 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
Design Model Lecture p6 T120B pavasario sem.
Domain Modeling Yonglei Tao.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
Object-Oriented Programming Chapter Chapter
 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
1 Inheritance Reserved word protected Reserved word super Overriding methods Class Hierarchies Reading for this lecture: L&L 9.1 – 9.4.
1 Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
CS 116 OBJECT ORIENTED PROGRAMMING II LECTURE 6 Acknowledgement: Contains materials provided by George Koutsogiannakis and Matt Bauer.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Unified Modeling Language (UML)
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 April 13, 2005.
Java - KFT1 Task 4 RegiStudent Diagrams
Java - KFT1 Task 4 RegiStudent Diagrams IT Java Course Mentors : - Pubali Banerjee, PhD - Cynthia Lang, PE, MSChE Western Governors University IT Java.
C# Programming: From Problem Analysis to Program Design1 Creating Your Own Classes C# Programming: From Problem Analysis to Program Design 4th Edition.
1 Inheritance One of the goals of object oriented programming is code reuse. Inheritance is one mechanism for accomplishing code reuse. It allows us to.
Java Programming: Guided Learning with Early Objects Chapter 9 Inheritance and Polymorphism.
Chapter 12 – Object-Oriented Design
Creating Your Own Classes
Unified Modeling Language Tutorial
Lecture 12 Inheritance.
Design Class Diagrams
Inheritance and Polymorphism
Collaborations and Hierarchies
Design Class Diagrams
KFT1 Task 4 GETTING STARTED
Advanced Programming in Java
Object-Orientated Programming
Computer Programming.
Object Oriented Analysis and Design
Inheritance, Polymorphism, and Interfaces. Oh My
Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract, Computer,
Presentation transcript:

ABT1/GUT1/KFT1 Task 4 Prep Diagrams for MediaManager Cynthia Lang, PE, MSChE Pubali Banerjee, PhD IT Course Mentors-Java Assessments

Tools for Task 4 Documentation Visual Paradigm You can also use PowerPoint for the diagrams. Other tools, both free and premium, can be used.

Diagrams Required for Task 4 Use Case Class Sequence

Use Case Diagrams Where are Use Case Diagrams used in the software life cycle? AnalysisDesignImplementationTestingDeployment Use CaseTechnical Documents Source Code Test ResultSign Off

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: 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.

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

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.

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

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.

What are Use Case and Class Diagrams? 24BE1&index=8&feature=plpp_video

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.

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

What is a Sequence Diagram?

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

Java COS Mentors Cynthia Lang, PE, MSChE Pubali Banerjee, PhD