IB Computer Science Content developed by Dartford Grammar School Computer Science Department UML.

Slides:



Advertisements
Similar presentations
General OO Concepts Objectives For Today: Discuss the benefits of OO Programming Inheritance and Aggregation Abstract Classes Encapsulation Introduce Visual.
Advertisements

Using Classes to Store Data Computer Science 2 Gerb.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Inheritance Writing and using Classes effectively.
Unified Modeling Language
Abstract Classes and Interfaces The objectives of this chapter are: To explore the concept of abstract classes To understand interfaces To understand the.
Object-Oriented PHP (1)
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
UML a crash course Alex Lo Brian Kiefer. Overview Classes Class Relationships Interfaces Objects States Worksheet.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Object-Oriented Modeling Using UML CS 3331 Fall 2009.
Distribution of Marks Internal Sessional Evaluation Assignments – 10 Quizzes – 10 Class Participation Attendence – 5 Mid – Term Test – 25 External Evaluation.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
TCU CoSc Introduction to Programming (with Java) Getting to Know Java.
Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.
Neal Stublen Key Concepts  Classes  Objects  Inheritance  Polymorphism  Encapsulation.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
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.
Writing Classes (Chapter 4)
Java Tutorial. Object-Oriented Programming Concepts Object –a representation of some item state  fields/members and should be encapsulated behavior 
1. 2 Object-Oriented Concept Class & Object Object-Oriented Characteristics How does it work? Relationships Between Classes Development Tools Advantage.
Object-Oriented Analysis and Design An Introduction.
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
Chris Kiekintveld CS 2401 (Fall 2010) Elementary Data Structures and Algorithms Inheritance and Polymorphism.
Chapter Two The UML – Unified Modeling Language Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Domain Model Classes and Objects Association Structure Requirement Specification Domain Model.
Information Systems Engineering
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
CSC 142 Computer Science II Zhen Jiang West Chester University
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
CSE 219 Computer Science III UML. UML Diagrams UML - Unified Modeling Language UML diagrams are used to design object-oriented software systems –represent.
Java Classes Chapter 1. 2 Chapter Contents Objects and Classes Using Methods in a Java Class References and Aliases Arguments and Parameters Defining.
Chapter 5 Classes and Methods II Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
IB Computer Science Content developed by Dartford Grammar School Computer Science Department Objects as a programming concept.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
Attribute - CIS 1068 Program Design and Abstraction Zhen Jiang CIS Dept. Temple University SERC 347, Main Campus 12/24/2016.
Object Oriented Programming I ( ) Dr. Adel hamdan Part 03 (Week 4) Dr. Adel Hamdan Date Created: 7/10/2011.
Structured Programming Dr. Atif Alhejali Lecture 4 Modifiers Parameters passing 1Structured Programming.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
SUBCLASSES - JAVA. The Purpose of Subclasses Class Farm String getOwner() void setOwner(String s) int getSize() void setSize(int s) Class DairyFarm String.
UML Class Diagrams David Millard
Object-Oriented Design Chapter 7 1. Objectives You will be able to Use the this reference in a Java program. Use the static modifier for member variables.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
IB Computer Science Content developed by Dartford Grammar School Computer Science Department Objects as a programming concept.
Unit II-Chapter No. : 5- design Patterns
System Design Basics IB Computer Science.
Objects as a programming concept
The Movement To Objects
Planning & System installation
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Objects as a programming concept
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Interfaces.
EKT 472: Object Oriented Programming
Objects as a programming concept
System Design Basics IB Computer Science.
Planning & System Installation
UML Class Diagram: class Rectangle
SYS466 Domain Classes – Part 1.
Chih-Ping Chu Dept. of Computer Science & Information Engineering
Abstract Classes and Interfaces
Abstract Classes and Interfaces
Presentation transcript:

IB Computer Science Content developed by Dartford Grammar School Computer Science Department UML

Content developed by Dartford Grammar School Computer Science Department HL Topics 1-7, D1-4

Content developed by Dartford Grammar School Computer Science Department HL & SL D.1 Overview D.1 Objects as a programming concept D.1.1 Outline the general nature of an object D.1.2 Distinguish between an object (definition, template or class) and instantiation D.1.3 Construct unified modelling language (UML) diagrams to represent object designs D.1.4 Interpret UML diagrams D.1.5 Describe the process of decomposition into several related objects D.1.6 Describe the relationships between objects for a given problem D.1.7 Outline the need to reduce dependencies between objects in a given problem D.1.8 Construct related objects for a given problem D.1.9 Explain the need for different data types to represent data items D.1.10 Describe how data items can be passed to and from actions as parameters

Content developed by Dartford Grammar School Computer Science Department Topic D.1.3 Construct unified modelling language (UML) diagrams to represent object designs.

Content developed by Dartford Grammar School Computer Science Department UML in reality UML helps to show interaction, behaviour and/or structure of programs and systems in diagrammatical form. UML has 6 different types of diagram in reality. In IB however, we only need to look at one of these: Component diagram Activity diagram Sequence diagram Class diagram Use Case diagram Communication diagram

Content developed by Dartford Grammar School Computer Science Department Foreword: Access levels in Java ModifierClassPackageSubclassWorld publicYYYY protectedYYYN no modifierYYNN privateYNNN

Content developed by Dartford Grammar School Computer Science Department Class Diagrams Classes (object), variables (state) & methods (behaviours)

Content developed by Dartford Grammar School Computer Science Department Try it Draw a class diagram to show the following Java scenario: One class called Dog Dog has 3 private states; breed (String), age (int) and name (string). Dog has 3 public behaviours: getBreed, getAge, getName. They each return their respective data type. Dog has 3 private behaviours: setBreed, setAge, setName. They all have void return type but take a parameter for their respective data type.

Content developed by Dartford Grammar School Computer Science Department Solution Dog - name : String - age : int - breed : String + getBreed() : String + getAge() : int + getName() : String - setName(name : String) : void - setAge(age : int) : void - setBreed(breed : String) : void

Content developed by Dartford Grammar School Computer Science Department Associations Contain multiple classes (Driver & Providers) Class A (driver) makes use of class B (provider). Class B does not know class A exists.

Content developed by Dartford Grammar School Computer Science Department Example

Content developed by Dartford Grammar School Computer Science Department Multiplicity Multiplicity helps define the relationship between classes that was created previously with associations.

Content developed by Dartford Grammar School Computer Science Department Multiplicity Multiplicity follows similar patterns to that of database technology *

Content developed by Dartford Grammar School Computer Science Department Try it Expand upon your dog class earlier: Assume the dog class is the provider class, and the driver class is a new class called Pound. The Pound class has one private state called “poundName”, and one public behaviour called “addDog” which adds a new instance of Dog. Once you have drawn this new class, connect the classes together with a suitable association and multiplicity.

Content developed by Dartford Grammar School Computer Science Department Solution Dog - name : String - age : int - breed : String + getBreed() : String + getAge() : int + getName() : String - setName(name : String) : void - setAge(age : int) : void - setBreed(breed : String) : void Pound - poundName : String + addDog(dog : Dog) : void Lives in a Houses 1 0..*

Content developed by Dartford Grammar School Computer Science Department Class Diagrams Static

Content developed by Dartford Grammar School Computer Science Department Class Diagrams Inheritance

Content developed by Dartford Grammar School Computer Science Department Class Diagrams Abstraction