Or how to work smarter when building solutions.  2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Lecture 6: Software Design (Part I)
Structured Design. 2 Design Quality – Simplicity “There are two ways of constructing a software design: One is to make it so simple that there are obviously.
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
Chapter 3: Modularization
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Programming Logic and Design Fourth Edition, Introductory
What is Software Design?  Introduction  Software design consists of two components, modular design and packaging.  Modular design is the decomposition.
Copyright Irwin/McGraw-Hill Software Design Prepared by Kevin C. Dittman for Systems Analysis & Design Methods 4ed by J. L. Whitten & L. D. Bentley.
Concepts of Systems Theory
Chapter 3 Data Abstraction: The Walls. © 2005 Pearson Addison-Wesley. All rights reserved3-2 Abstract Data Types Modularity –Keeps the complexity of a.
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Lecture 4 Class Responsibility Collaboration Cards
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Chapter 2 Succeeding as a Systems Analyst
Chapter 1 Principles of Programming and Software Engineering.
Software Lifecycle A series of steps through which a software product progresses Lifetimes vary from days to months to years Consists of –people –overall.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Chapter 1 Program Design
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Implementation. We we came from… Planning Analysis Design Implementation Identify Problem/Value. Feasibility Analysis. Project Management. Understand.
Chapter 22 Object-Oriented Design
The chapter will address the following questions:
 Computer Science 1MD3 Introduction to Programming Michael Liut Ming Quan Fu Brandon.
Cmpe 471 Computer Crime: Techniques and Countermeasures.
Introduction to Object-oriented programming and software development Lecture 1.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
Design-Making Projects Work (Chapter7) n Large Projects u Design often distinct from analysis or coding u Project takes weeks, months or years to create.
CSE 303 – Software Design and Architecture
Top-Down Design and Modular Development
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Modular Programming. Modular Programming (1/6) Modular programming  Goes hand-in-hand with stepwise refinement and incremental development  Makes the.
Slide 1 Construction (Testing) Chapter 15 Alan Dennis, Barbara Wixom, and David Tegarden John Wiley & Sons, Inc. Slides by Fred Niederman Edited by Solomon.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Software Engineering Principles Principles form the basis of methods, techniques, methodologies and tools Principles form the basis of methods, techniques,
SE: CHAPTER 7 Writing The Program
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Programming Logic and Design Using Methods. 2 Objectives Review how to use a simple method with local variables and constants Create a method that requires.
Software Engineering Principles. SE Principles Principles are statements describing desirable properties of the product and process.
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Abstraction ADTs, Information Hiding and Encapsulation.
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
Java Fundamentals Usman Ependi UBD
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
Software Engineering Principles Practical Advice and Steps for Managing Your Project.
CSci 162 Lecture 8 Martin van Bommel. Large-scale Programming Up to now we have been writing relatively short programs to solve simple problem Want to.
Introduction to Service Orientation MIS 181.9: Service Oriented Architecture 2 nd Semester,
Chapter 10 Software quality. This chapter discusses n Some important properties we want our system to have, specifically correctness and maintainability.
Programming Logic and Design Fifth Edition, Comprehensive Chapter 7 Using Methods.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
Further Modularization, Cohesion, and Coupling. Simple Program Design, Fourth Edition Chapter 9 2 Objectives In this chapter you will be able to: Further.
Principles of Programming & Software Engineering
Software Design.
Programming paradigms
CHAPTER 5 GENERAL OOP CONCEPTS.
Coupling and Cohesion 1.
System Design Ashima Wadhwa.
Data Abstraction: The Walls
Principles of Programming and Software Engineering
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Programming Logic and Design Fourth Edition, Comprehensive
Presentation transcript:

Or how to work smarter when building solutions

 2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All are welcome although those that were struggling with 139 and now 239 are particularly encouraged to attend  Review tab in Blackboard will contain assignments and schedule for the sessions (up this afternoon)

 Review from lab  Design

 What did you learn?  What is still fuzzy?  Which command characters signal EOF?  Unix  DOS

 Goals  To maximize programmer efficiency  By Promoting reuse Breaking a problem down into a series of small components Easy to understand Easy to repair if components are independent Spending time up front on design Rework costs more money than writing it right the first time

 There is no one “right” way to write code.  There are better designs and poorer designs.  Examine alternatives before proceeding.

 Designs should be modular  Design should follow local standards  Design should look for simplicity  Designs can/should be elegant  Designs should be generalizable to the extent possible

 Humans can only comprehend so much  Localizing code where each “module” does only one thing makes it easier to write and to maintain  Such design enables teams to break solutions down into pieces that each can do  Promotes reuse – a small solution may be able to be used in many other solutions. A large complex solution must often stand alone.

 Help us to understand.  Think of language. Our language gives us a common set of terms with which we can communicate.  Coding standards do the same.  Not following standards can lead to your code not being reused or maintained.

 Why write 5 lines of code when one will do?  But avoid cramming 5 different statements into one.  It is simpler to use a library routine than to build one on your own.  Simple code is more easily understood.  Simple code is more likely to be reused.

 There is beautiful code.  Elegant code is studied and is more likely to be reused.  Elegant code is clearly understood.

 You can write a solution for individual cases  OR  You can find out what those cases have in common and write a solution that will work for all of them  Look for ways to generalize what you are doing... if the exceptions overwhelm the rule, change the rule.

 Encapsulation – Combining into a well designed unit data and methods pertaining to an “actor” in a solution.  Requires thinking not about the task to be done, but about the different data to be manipulated.  Divides a problem up into “actors” and the “actions” that those actors take.

 Should be isolation – information detail should be hidden from other classes  Methods that are public should provide well known ways of interacting with those objects.  By encapsulation and hiding the details, we can make appropriate changes to the class without affecting the programs that use the class.

 Class and instance data – only provide public access to values that will serve users of the class.  Helper methods – any method that is designed to help other methods of the class and that are not intended for public use should be private  A method should hide how it is accomplishing its task. Documentation should include what we expect to come in (input) and what will be produced (output) and any side effects (exceptions, mutation of data). That is all!

 Cohesion – The degree to which parts of a module are related to one another.  In designing good modules you want a high level of cohesion.  Separate input, input validation, calculations and output.  Modules should relate to “real world” as most applications are simulating some real process.

 The degree to which modules require one another  We want to reduce the degree of coupling in designing modules.  Modules that access one another’s public data have a high degree of coupling.  Privatizing data and strengthening the use of method interfaces reduces coupling.

 Classes are the definition of the characteristics of some set of objects  An object is one member of the set.  Classes encapsulate data and operations on that data.  Objects know themselves and can answer questions about themselves through methods.  Objects (through the classes that define them) know their own “rules”.

 BaseStat.java BaseStat.java