Informatics 122 Software Design II

Slides:



Advertisements
Similar presentations
(c) 2009 University of California, Irvine – André van der Hoek1April 20, 2015 – 00:59:05 Informatics 122 Software Design II Lecture 11 André van der Hoek.
Advertisements

Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 223 Applied Software Design Techniques.
Introduction to Software Engineering Lecture 4 André van der Hoek.
1 CSE1301 Computer Programming: Lecture 23 Algorithm Design (Part 1)
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
© 2010 University of California, Irvine – André van der Hoek1June 10, 2015 – 06:18:06 Informatics 121 Software Design I Lecture 10 André van der Hoek &
© 2009 University of California, Irvine – André van der Hoek1June 10, 2015 – 18:31:15 Informatics 122 Software Design II Lecture 2 André van der Hoek &
© 2010 University of California, Irvine – André van der Hoek1June 12, 2015 – 07:51:20 Informatics 121 Software Design I Lecture 8 André van der Hoek &
© 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 18:19:12 Informatics 122 Software Design II Lecture 5 André van der Hoek &
(c) 2009 University of California, Irvine – André van der Hoek1June 13, 2015 – 21:42:16 Informatics 122 Software Design II Lecture 8 André van der Hoek.
© 2010 University of California, Irvine – André van der Hoek1June 15, 2015 – 14:08:09 Informatics 122 Software Design II Lecture 4 André van der Hoek &
© 2009 University of California, Irvine – André van der Hoek1June 15, 2015 – 14:29:37 Informatics 121 Software Design I Lecture 1 André van der Hoek and.
© 2010 University of California, Irvine – André van der Hoek1June 16, 2015 – 21:42:11 Informatics 121 Software Design I Lecture 7 André van der Hoek &
© 2009 University of California, Irvine – André van der Hoek1June 17, 2015 – 09:17:24 Informatics 122 Software Design II Lecture 6 André van der Hoek &
(c) 2010 University of California, Irvine – André van der Hoek1February 21, 2010 – 18:05:18 Informatics 122 Software Design II Lecture 10 Nick Lopez Duplication.
Ch3: Software Engineering Principles 1 What is a principle?  Definition:  Goals of accounting principles:  Goals of software engineering principles?
© 2010 University of California, Irvine – André van der Hoek1June 22, 2015 – 23:08:13 Informatics 122 Software Design II Lecture 4 Nick Lopez Duplication.
© 2010 University of California, Irvine – André van der Hoek1June 25, 2015 – 15:42:49 Informatics 121 Software Design I Lecture 13 André van der Hoek &
© 2010 University of California, Irvine – André van der Hoek1June 26, 2015 – 00:06:40 Informatics 122 Software Design II Lecture 6 André van der Hoek &
© 2010 University of California, Irvine – André van der Hoek1June 28, 2015 – 09:26:53 Informatics 121 Software Design I Lecture 12 André van der Hoek &
(c) 2010 University of California, Irvine – André van der Hoek1February 21, 2010 – 18:05:18 Informatics 122 Software Design II Lecture 10 André van der.
(c) 2010 University of California, Irvine – André van der Hoek1June 29, 2015 – 08:55:05 Informatics 122 Software Design II Lecture 8 André van der Hoek.
© 2009 University of California, Irvine – André van der Hoek1June 29, 2015 – 10:35:56 Informatics 122 Software Design II Lecture 4 André van der Hoek &
© 2010 University of California, Irvine – André van der Hoek1July 14, 2015 – 14:37:42 Informatics 122 Software Design II Lecture 4 Nick Lopez Duplication.
Week 2 Design Examples and Designing for Change Alex Baker.
ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 3 Partially based on lecture notes written by.
+ Informatics 122 Software Design II Lecture 6 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
© 2010 University of California, Irvine – André van der Hoek1October 23, 2015 – 10:21:58 Informatics 122 Software Design II Lecture 1 André van der Hoek.
Introduction to Design. What is Design? 2 minutes Pairs.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
+ Informatics 122 Software Design II Lecture 3 Emily Navarro Duplication of course material for any commercial purpose without the explicit written permission.
© Chinese University, CSE Dept. Software Engineering / Topic 3: Software Engineering Principles Your Name: _____________________ Computer Science.
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 122 Software Design II
Informatics 121 Software Design I
Informatics 121 Software Design I
Informatics 122 Software Design II
Informatics 121 Software Design I
Presentation transcript:

Informatics 122 Software Design II Lecture 2 André van der Hoek Duplication of course material for any commercial purpose without the explicit written permission of the professor is prohibited. April 18, 2019 – 13:12:25 (c) 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek Today’s Lecture Implementation design objectives Examples Day MultiPlotter ServiceCallDatabase Assignment 2a April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Three Goals of Implementation Design Provide a shared plan to follow Consistency Ensure the plan meets its recipients’ needs Helpfulness Ensure the solution is appropriate Effectiveness April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek But How to Get There? Practice, practice, practice… April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek But How to Get There? Practice, practice, practice… Examples, examples, examples… April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek But How to Get There? Practice, practice, practice… Examples, examples, examples… Some guidelines exist April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Fundamental Principles Rigor Separation of concerns modularity abstraction Anticipation of change Generality Incrementality April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

During the Design Process Strive for grouping related functionality (high cohesion) metaphor guides decisions understandability Strive for ungrouping semi-related functionality (high cohesion) untangling concerns that do not need to be tangled evolvability Strive for reducing interdependency (low coupling) changes do not propagate reuse is facilitated maintainability All aid in dividing work April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek Class Design Cohesion Completeness Convenience Clarity Consistency April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Interfaces – The Key to Class Design (Good) Interfaces are rigorously and formally defined (Good) Interfaces separate concerns (good) interfaces modularize a system (good) interfaces abstract implementation details (Good) Interfaces anticipate change (Good) Interfaces present generalizations (Good) Interfaces promote incrementality April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek Software Qualities Correctness Reliability Robustness Performance User friendliness Verifiability Maintainability Repairability Safety Evolvability Reusability Portability Understandability Interoperability Productivity Size Timeliness Visibility These qualities may be in conflict with each other April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

© 2006 University of California, Irvine – André van der Hoek Example 1: Day April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Example 2: MultiPlotter April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Example 3: ServiceCallDatabase April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Assignment 2a: Basic Structure Implement the game “Theseus and the Minotaur” according to the UML design provided on the course web site You are free to make any updates to the design you desire, but if you do so they must be properly documented and your implementation has to follow your new design A sample running version of the game is available on the web http://www.logicmazes.com/theseus.html compared to this game, we do not use walls, but blocks to delineate possible paths April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Assignment 2a: Game Rules Neither the player nor the Minotaur can move through blocks During the game, first, the player gets a turn, where they can move, up, down, left or right, or simply delay without moving After the player's turn, the Minotaur takes two turns, and on each it does the following: it tests if it can move horizontally and get closer to the player if it can, it will move one square horizontally if it cannot, it will test if it can move vertically and get closer to the player if it can, it will move one square vertically if it cannot move either horizontally or vertically, then it just skips that turn After the Minotaur takes its two turns, the player takes another turn, and so on The game ends if the player reaches the exit (victory!), or if the Minotaur is on the same space as the player (defeat!) April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Assignment 2a: Input File Encoding The game is to be run from the command line, with a filename as parameter this filename must point to an input file containing a maze from which Theseus has to escape a sample input file is provided on the course web site Encoding of the input file 0 = empty space (accessible to Theseus and the Minotaur) 1 = brick (not accessible to Theseus and the Minotaur) E = exit (the Minotaur can move over an exit) P = player M = Minotaur April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Assignment 2a: Game Input Input will be through the keyboard only Keys to use a = move left d = move right w = move up x = move down s = delay (choose not to move) April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Assignment 2a: A Wrinkle Since the basic design was completed, the customer has asked for the addition of one new game element: water the Minotaur cannot move over water the player can move over water In the sample maze, water is denoted by a “w” April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek

Assignment 2a: Deliverables A print-out of your final, updated UML design with updates as you see fit to adjust for the presence of water, and to make any other improvements that you deem necessary A print-out of your design rationale which changes did you make to the original design, and why? A print-out of your source code A running version of your game (as a JAR) Print-outs are to be handed in in class, the JAR must be e-mailed to andre@ics.uci.edu and abaker@ics.uci.edu April 18, 2019 – 13:12:25 © 2006 University of California, Irvine – André van der Hoek