Review: Cohesion and Coupling, Mutable, Inheritance Screen Layouts Software methodologies – Extreme Programming Object-Oriented Design – CRC Cards - UML.

Slides:



Advertisements
Similar presentations
Chapter 8 Designing Classes Designing Classes –8.1 Choosing Classes –8.2 Cohesion and Coupling –CRC Cards –UML Diagrams.
Advertisements

The System and Software Development Process Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Chapter 2 Modeling the Process and Life Cycle Shari L. Pfleeger
COMP 121 Week 7: Object-Oriented Design and Efficiency of Algorithms.
SEP1 - 1 Introduction to Software Engineering Processes SWENET SEP1 Module Developed with support from the National Science Foundation.
Ch 12: Object-Oriented Analysis
Problem Solving #1 ICS Outline Review of Key Topics Review of Key Topics Example Program Example Program –Problem 7.1 Problem Solving Tips Problem.
Chapter Goals To learn how to choose appropriate classes to implement
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Agile Requirements Methods CSSE 371 Software Requirements and Specification Mark Ardis, Rose-Hulman Institute October 26, 2004.
Agile Methodology: The New Wave in Software Development By Patricia Cleary Thesis Hypothesis: The agile methodologies are better than the current methodology.
Agile Software Development Matt Rice November 27, 2006.
Class Design CSC 171 FALL 2004 LECTURE 11. READING Read Chapter 7 It’s abstract But it should help with project #1.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
1 Lecture 5 Introduction to Software Engineering Overview  What is Software Engineering  Software Engineering Issues  Waterfall Model  Waterfall Model.
Extreme Programming--a “New” Process Model Extreme Programming-- a “New” Process Model.
COMP 350: Object Oriented Analysis and Design Lecture 2
Xtreme Programming. Software Life Cycle The activities that take place between the time software program is first conceived and the time it is finally.
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.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Objects What are Objects Observations
CIS 321—IS Analysis & Design
COMP 121 Week 7: Object-Oriented Design and Efficiency of Algorithms.
Understand Application Lifecycle Management
Big Java Chapter 12. Software Process - Waterfall Analysis Design Implementation Testing Deployment Does not work well when rigidly applied! established.
CPSC 2150 August 21, Chapter 1 Object Oriented Software Development This is an introductory course In this chapter we will look at 3 topics Challenges.
Objects First With Java A Practical Introduction Using BlueJ Designing applications 1.0.
1 Object orientation. 2 What benefits does OO give? Primarily –Encapsulation (Associates data & operations) –Types & specialisation –Software re-use.
CSE 308 Software Engineering Software Engineering Strategies.
1 Software Process Models-ii Presented By; Mehwish Shafiq.
ICONIX P ROCESS FOR S OFTWARE D EVELOPMENT Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn 1.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Extreme Programming (XP). Agile Software Development Paradigm Values individuals and interactions over processes and tools. Values working software over.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Systems Analysis & Design 7 th Edition Chapter 5.
240 3/30/98 CSE 143 Object-Oriented Design [Chapter 10]
Rational Unified Process Mr Hisham AlKhawar. Iterative versus Waterfall  We need to use a life cycle model in order to approach developing a system easily,
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 other methodologies 1 Method/Process = step-by-step description of the steps involved.
Object-Oriented Analysis and Design. Lesson 1: Introduction to Software Engineering.
Designing Classes Chapter 3. 2 Chapter Contents Encapsulation Specifying Methods Java Interfaces Writing an Interface Implementing an Interface An Interface.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved COS240 O-O Languages AUBG,
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
Lecture 2 –Approaches to Systems Development Method 10/9/15 1.
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns Objects First with Java - A Practical.
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.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Test Driven Development Daniel Brown dxb17u. Introduction Originates from Extreme Programming (XP) Proposed by Kent Beck in Test Driven Development.
12 OBJECT-ORIENTED DESIGN CHAPTER
Lecture 3 – Agile Approach
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Assignment 1 due tomorrow, 7pm. RAD due next Friday in your Wiki. Presentations week 6. Tomorrow’s lecture.
Extreme Programming. Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology.
INFSY 535.  Small systems  Larger systems 1.Understand the program requirement- what 3. Write and test each part (unit testing) 4. Maintenance 2. Specify.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Life Cycles. Waterfall Advantages? Disadvantages? Well suited for what type of projects? Requirements Specification Design Coding Unit Testing Installation.
Agile Development Chapter 10 - part 2. Agile Philosophy  A guiding philosophy and set of guidelines for : developing information systems in an unknown,
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns © 2017 Pearson Education, Inc. Hoboken,
Extreme Programming מתודולוגיה לפיתוח פרויקטי תוכנה.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Software Development Life Cycle. The Software Life Cycle  Encompasses all activities from initial analysis until end of work  Formal process for software.
Project Management Software development models & methodologies
Software Engineering cosc 4359 Spring 2017.
Software Development.
Chapter 12 – Object-Oriented Design
Chapter 7: Software Engineering
CSSE 220 Day 17 Introduction to your Vector Graphics project
Reference: COS240 Syllabus
ITEC324 Principle of CS III
ITEC324 Principle of CS III
Presentation transcript:

Review: Cohesion and Coupling, Mutable, Inheritance Screen Layouts Software methodologies – Extreme Programming Object-Oriented Design – CRC Cards - UML class diagrams

Analysis Design Implementation Testing Deployment Maintenance Software Development

 Standardized approaches intended to: ◦ Reduce costs ◦ Increase predictability of results  Examples: ◦ Waterfall model ◦ Spiral model ◦ “Rational Unified Process”

 Do each stage to completion  Then do the next stage  Do each stage to completion  Then do the next stage Pipe dream model? Analysis Design Implementation Testing Deployment

 Repeat phases in a cycle  Produce a prototype at end of each cycle  Get early feedback, incorporate changes  Schedule overruns  Scope creep  Schedule overruns  Scope creep Analysis Design Implementation Testing Deployment Prototype

 Like the spiral model with very short cycles  Pioneered by Kent Beck  One of several “agile” methodologies, focused on building high quality software quickly  Rather than focus on rigid process, XP espouses 12 key practices…

 Realistic planning  Small releases  Shared metaphors  Simplicity  Testing  Refactoring  Pair programming  Collective ownership  Continuous integration  40-hour week  On-site customer  Coding standards When you see opportunity to make code better, do it Use descriptive names Q1

It starts with good classes…

 Often come from nouns in the problem description  May… ◦ Represent single concepts  Circle, Investment ◦ Be abstractions of real-life entities  BankAccount, TicTacToeBoard ◦ Be actors  Scanner, CircleViewer ◦ Be utilities  Math Q2

 Can’t tell what it does from its name ◦ PayCheckProgram  Turning a single action into a class ◦ ComputePaycheck  Name isn’t a noun ◦ Interpolate, Spend Q3

 Cohesion  Coupling

 A class should represent a single concept  Public methods and constants should be cohesive  Which is more cohesive? CashRegister double NICKEL_VALUE double DIME_VALUE double QUARTER_VALUE void add(int nickels, int dimes, int quarters) … CashRegister void add(ArrayList coins) … Coin double getValue() Q4

 When one classes requires another class to do its job, the first class depends on the second  Shown on UML diagrams as: ◦ dashed line ◦ with open arrowhead CashRegister void add(ArrayList coins) … Coin double getValue() Q5

 Lots of dependencies == high coupling  Few dependencies == low coupling  Which is better? Why? Q6

 High cohesion  Low coupling  Immutable where practical, document where not  Inheritance for code reuse  Interfaces to allow others to interact with your code

A practical technique

 We won’t use full-scale, formal methodologies ◦ Those are in later SE courses  We will practice a common object-oriented design technique using CRC Cards  Like any design technique, the key to success is practice

1. Discover classes based on requirements 2. Determine responsibilities of each class 3. Describe relationships between classes Q2

 Brainstorm a list of possible classes ◦ Anything that might work ◦ No squashing  Prompts: ◦ Look for nouns ◦ Multiple objects are often created from each class  so look for plural concepts ◦ Consider how much detail a concept requires:  A lot? Probably a class  Not much? Perhaps a primitive type  Don’t expect to find them all  add as needed Tired of hearing this yet?

 Look for verbs in the requirements to identify responsibilities of your system  Which class handles the responsibility?  Can use CRC Cards to discover this: ◦ Classes ◦ Responsibilities ◦ Collaborators

 Use one index card per class Class name Collaborators Responsibilities Q3

1. Pick a responsibility of the program 2. Pick a class to carry out that responsibility ◦ Add that responsibility to the class’s card 3. Can that class carry out the responsibility by itself? ◦ Yes  Return to step 1 ◦ No   Decide which classes should help  List them as collaborators on the first card  Add additional responsibilities to the collaborators’ cards

 Spread the cards out on a table ◦ Or sticky notes on a whiteboard instead of cards  Use a “token” to keep your place ◦ A quarter or a magnet  Focus on high-level responsibilities ◦ Some say < 3 per card  Keep it informal ◦ Rewrite cards if they get to sloppy ◦ Tear up mistakes ◦ Shuffle cards around to keep “friends” together

 Classes usually are related to their collaborators  Draw a UML class diagram showing how  Common relationships: ◦ Inheritance: only when subclass is a special case ◦ Aggregation: when one class has a field that references another class ◦ Dependency: like aggregation but transient, usually for method parameters, “has a” temporarily ◦ Association: any other relationship, can label the arrow, e.g., constructs NEW!

Q4