Tutorial 2 Today we will have a quick introduction to ArgoUML and how to use it, as well as look at some examples of class diagrams.

Similar documents
Announcements. 1. Forms to return today after class:

Final Exam. Programming Assignment 3. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings

Superclasses / subclasses Inheritance in Java Overriding methods Abstract classes and methods Final classes and methods

Review: Object Diagrams for Inheritance. Type Conformance. Inheritance Structures. Car. Vehicle. Truck. Vehicle. conforms to Object

Summer Assignment for AP Computer Science. Room 302

Lecture 02, Fall 2018 Friday September 7

Inheritance and Interfaces

Project 1 Computer Science 2334 Spring 2016 This project is individual work. Each student must complete this assignment independently.

CSCI 102 Fall 2010 Exam #1

Configure Eclipse with Selenium Webdriver

User Guide on Online Resource Booking System (ORBS) Centre for Genomic Sciences HKU

CS 110 Practice Final Exam originally from Winter, Instructions: closed books, closed notes, open minds, 3 hour time limit.

last time in cs recitations. computer commands. today s topics.

The boutique will be open for 5 weeks this year and I am looking forward to a spectacular show! A blank registration form is enclosed.

Two Types of Types. Primitive Types in Java. Using Primitive Variables. Class #07: Java Primitives. Integer types.

Final Exam. Programming Assignment 3. University of British Columbia CPSC 111, Intro to Computation Alan J. Hu. Readings

Functional Mathematics 4368

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently.

Computer Science II (20073) Week 1: Review and Inheritance

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

Unit 5 Test 2 MCC5.G.1 StudyGuide/Homework Sheet

Announcements. Course syllabus Tutorial/lab signup form (due 4pm today) Lecture 1 notes Homework 1 Initial assessment

Instance Members and Static Members

COMPUTER SCIENCE DEPARTMENT PICNIC. Operations. Push the power button and hold. Once the light begins blinking, enter the room code

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Announcements. PS 3 is due Thursday, 10/6. Midterm Exam 1: 10/14 (Fri), 9:00am-10:53am

More Examples Using Functions and Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #6

Day 3. COMP 1006/1406A Summer M. Jason Hinek Carleton University

Engr 123 Spring 2018 Notes on Visual Studio

143a, Spring 2018 Discussion Week 4 Programming Assignment. Jia Chen 27 Apr 2018

Object Orientated Analysis and Design. Benjamin Kenwright

Introduction to Java. Handout-1d. cs402 - Spring

Logistics. Final Exam on Friday at 3pm in CHEM 102

Object-Oriented Programming Classes, Objects, Variables

System Firmware Update Instructions for Pioneer In-Dash Navigation AV Receivers and Multimedia DVD Receiver

CS 170 Java Programming 1. Week 7: More on Logic

System Firmware Update Instructions for Pioneer In-Dash Navigation AV Receivers and DVD Receivers

Tips from the experts: How to waste a lot of time on this assignment

System Firmware Update Instructions for Pioneer In-Dash AV Receiver

COMP-202: Foundations of Programming. Lecture 2: Java basics and our first Java program! Jackie Cheung, Winter 2015

Software and Programming 1

public class Test { public static int i = 0;

York University Department of Electrical Engineering and Computer Science. Regular Expressions

Building custom components IAT351

CS 152: Data Structures with Java Hello World with the IntelliJ IDE

CMPE/SE 135 Object-Oriented Analysis and Design

FAQ. Use the links below to find detailed tutorials on using MSA.

Week 2. CS 400 Programming III. Read: Module 2 readings before lecture

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

Programming Karel the Robot

Schedule/BACnet Schedule

HAS-A Relationship. Association is a relationship where all objects have their own lifecycle and there is no owner.

CS 370: Problem Set 2

System Firmware Update 1.06 Instructions for Pioneer AVH-4200NEX Indash Multimedia AV Receiver

AP Computer Science Summer Work Mrs. Kaelin

CP122 CS I. Chapter 13: Recursion

System Firmware Update Instructions for Pioneer In-dash DVD Receivers (AVH-X391BHS and AVH-X491BHS)

HAS-A Relationship. Association is a relationship where all objects have their own lifecycle and there is no owner.

Basic Class Diagrams. Class Diagrams, cont d. Class Diagrams, cont d. Car. Car. Car. What does the minus sign here mean?

CS100J, Fall 2003 Preparing for Prelim 1: Monday, 29 Sept., 7:30 9:00PM

Firmware Update Instructions for AVH-W4400NEX

Computer Science II Data Structures

System Firmware Update Instructions for Pioneer In-Dash AV Receivers

Year 10 Semester 1 Assessment Calendar

CMSC201 Computer Science I for Majors

CSC207 Week 3. Larry Zhang

Getting Started with WebEx

System Firmware Update Instructions for Pioneer In-Dash Digital Multimedia Video Receivers

HAS-A Relationship. If A uses B, then it is an aggregation, stating that B exists independently from A.

Day 4. COMP1006/1406 Summer M. Jason Hinek Carleton University

AVIC-8100NEX AVIC-7100NEX AVIC-6100NEX AVIC-5100NEX AVH-4100NEX

Chapter 6 Lab Classes and Objects

CONTENTS: What Is Programming? How a Computer Works Programming Languages Java Basics. COMP-202 Unit 1: Introduction

Object Oriented Programming. Week 1 Part 1 An introduction to Java, Objects and JUnit

Introducing the UML Eng. Mohammed T. Abo Alroos

Setting up your Computer

Welcome (back) to CS1007!

UML & OO Fundamentals. CSCI 4448/5448: Object-Oriented Analysis & Design Lecture 3 09/04/2012

CSE 201 JAVA PROGRAMMING I. Copyright 2016 by Smart Coding School

1 Overview. 1 Overview. Contents. 1.1 Table of Contents Table of Contents

CS 2110 Fall Instructions. 1 Installing the code. Homework 4 Paint Program. 0.1 Grading, Partners, Academic Integrity, Help

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG

C02: Overview of Software Development and Java

CS 455 Midterm Exam 1 Fall 2015 [Bono] Thursday, Oct. 1, 2015

Open and respond to this poll: PollEv.com/comp110. Calling Methods Mr. Roboto

CS 349 / SE 382 Design Patterns. Professor Michael Terry January 21, 2009

COMP-202: Foundations of Programming. Lecture 26: Review; Wrap-Up Jackie Cheung, Winter 2016

Lecture 2. COMP1406/1006 (the Java course) Fall M. Jason Hinek Carleton University

CS246 Software Abstraction and Specification Final Examination

AP CS Unit 6: Inheritance Notes

LABORATORY 1 REVISION

CS 170 Section 3, Spring 2015 Programming in Java Midterm Exam 1. Name (print):

Computer Science is...

SADDLEBACK COLLEGE BUSINESS SCIENCE DIVISION

CompSci 230 Software Construction

Syllabus -- CIS Computer Maintenance / A+ Certification

Certificate in Business Administration [Level 4] 2016

COS 126 Exam 2 Review Part 1

More on Arrays CS 16: Solving Problems with Computers I Lecture #13

UML & OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 3 08/30/2011

Transcription:

Tutorial 2 Today we will have a quick introduction to ArgoUML and how to use it, as well as look at some examples of class diagrams. This is an answer sheet, answers are marked in RED. Quiz dates: Quiz 1, available from 9am Friday 13 Mar to 11:30pm Monday 16 Mar. Quiz 2, available from 9am Friday 3 Apr to 11:30pm Monday 6 Apr Quiz 3, available from 9am Friday 8 May to 11:30pm Monday 11 May Quiz 4, available from 9am Friday 29 May to 11:30pm Tuesday2 Jun. Note: Monday 1 June is the Queen's Birthday holiday. Review Last week we looked at how to use Eclipse and an introduction to using Java. Try answering the following question about the Java main() method. Q1: What do each of the keywords of the following method signature mean? public static void main(string[] args) { } public static void This method is accessible to the Class, Package, Subclass and anywhere this package is used (AKA World ). This member belongs to the class and not the instance (object). It means that only one instance of a static field exists even if you create a million instances of the class or you don't create any. It will be shared by all instances. This method does not return any value. String[] args An array of String objects representing the command-line arguments this application received when it was run. Tutor Contact Details Freddy Hutchinson: fhut994@aucklanduni.ac.nz Monica Bian: rbia002@aucklanduni.ac.nz Page 1

Page 2

Part A Installing & using ArgoUML ArgoUML is a diagramming tool designed for creating and modifying UML diagrams. Its use is required by your first assignment in CS230. Step 1: Go to http://argouml-downloads.tigris.org/argouml-0.34/ Step 2: Download ArgoUML-0.34.zip - Binary distribution (.zip format). Step 3: Save it somewhere on your H:\ drive (or, alternatively your home computer or USB memory drive) Step 4: Unzip the.zip file. Step 5: Inside the extracted directory, open argouml.jar o ArgoUML should now launch Step 6: Download umlexamples.zargo from the course assignment page and save it as above Step 7: (In ArgoUML) use File > Open Project to open the above.zargo file. You should now see something like this: Page 3

Aggregation implies a relationship where the child can exist independently of the parent. Example: Class (parent) and Student (child). Delete the Class and the Students still exist. Composition implies a relationship where the child cannot exist independent of the parent. Example: House (parent) and Room (child). Rooms don't exist separate to a House. The above two are forms of containment (hence the parent-child relationships). Dependency s a weaker form of relationship and in code terms indicates that a class uses another by parameter or return type. Dependency is a form of association. Part B - Class Diagrams Step 1: In ArgoUML go to Create > New Class Diagram o You should be presented with a blank canvas. Optional Step 2: In the properties pane, you can rename your diagram by modifying the Name field illustrated below. How to use the Class Diagram Designer Task 1: Now that you have ArgoUML installed and a brief overview of its features, you now have the opportunity to practice. Use the above tools to draw the following Class Diagram. Outline: A local pet store has contracted you to design a system to keep track of their stock, orders and customers. Before you start work on any code, they want to see what your design looks like. Draw a simple UML Class Diagram that conveys the following basic concepts. An Order class to keep track of each order a customer makes. It needs to have (at minimum) the properties of date, price, customer, and animals that were sold. Page 4

An Item class that has a properties type, price and quantity for items like Toys, birdcages and fishtanks. An Animal class that extends (or generalises) Item, to keep track of each animal in their stock. An animal needs the further properties of breed and isfed. It also needs the member (operation) of Feed() A Customer class to keep track of each customer, with the properties name and address. Think about the types the following variables would need to have if they were implemented as a class. The following are some type suggestions: float, boolean, String, Date. Page 5

Solution: Page 6

Part C Use-Case Diagrams Step 1: using ArgoUML go to Create > New Use Case Diagram Task 2: For the example described above in part B, draw a use-case diagram to represent the following cases: A customer examining/petting an animal. A customer purchasing an animal. A staff member feeding the animals. Page 7

Solution: Page 8