5 Pages

design

Course: SC 504, Fall 2009
School: Syracuse
Rating:
 
 
 
 
 

Word Count: 1494

Document Preview

1 Page of 5 Design issues for Large Applications Software development is an iterative and incremental process. Each stage of the process is revisited repeatedly during the development, and each visit refines the end products of that stage. In general, the process has no beginning and no end. When designing and implementing a system, you start from a base of other peoples designs, libraries, and application...

Register Now

Unformatted Document Excerpt

Coursehero >> New York >> Syracuse >> SC 504

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
1 Page of 5 Design issues for Large Applications Software development is an iterative and incremental process. Each stage of the process is revisited repeatedly during the development, and each visit refines the end products of that stage. In general, the process has no beginning and no end. When designing and implementing a system, you start from a base of other peoples designs, libraries, and application software. When you finish, you leave a body of design and code for others to refine, revise, extend and port. Naturally, a specific project can have a definite befinning and end, and it is important to delimit the project cleanly and precisely in time and scope. However, pretending that you are starting from a clean slate can cause serious problems. Pretending that the world ends at the final delivery can cause equally serious problems for your successors. One implication of this is that design is almost always redesign based on a previous design and some implementation experience. Furthermore, the design is constrained by schedules, the skills of the people involved, compatibility issues, etc. a major challenge to a designer/manager/programmer is to create order in this process without stifling innovation and destroying the feedback loops that are necessary for successful development. The development process has three stages: - analysis: defining the scope of the problem to be solved - design: creating an overall structure for a system - implementation: writing and testing the code Please remember the iterative nature of this process it is significant that these stages are not numbered. Note that some major aspects of program development dont appear as separate stages because they ought to permeate the process: - experimentation - testing - analysis of the design and the implementation - documentation - management Software maintenance is simply more iterations through this development process. For small-to-medium projects, there is often no distinction made between analysis and design; these two phases have been merged into one. Similarly, in small projects there often is no distinction made between design and programming. The development cycle Developing a system should be an iterative activity. The main loop consists of repeated trips through this sequence: 1. Examine the problem. 2. Create an overall design. 3. Find standard components. Page 2 of 5 - Customize the components for this design. 4. Create new standard components. - Customize the components for this design. 5. Assemble the design. Design aims The implication is that the system must be designed to remain as simple as possible under a sequence of changes. We must design for change; i.e. we must aim for - Flexibility - Extensibility, and - Portability This is best done by trying to encapsulate the areas of a system that are likely to change and by providing non-intrusive ways for a later designer/programmer to modify the behavior of the code. This is done by identifying the key concepts of an application and giving each class the exclusive responsibility for ht maintenance of all information relating to a single concept. In that case, a change can be effected by a modification of that class only. Ideally, a change to a single concept can be done by deriving a new class or by passing a different argument to a template. Naturally, this ideal is much easier to state than to follow. Design steps Consider designing a single class. Typically, this is not a good idea. A class does not exist in isolation but is defined together with logically related classes. Typically, one works on a set of related classes. Such a set is often called a class library or a component. Sometimes all classes in a component constitute a single class hierarchy, sometimes they are members of a single namespace. Here is a series of steps that might be followed in designing a component: 1. find the concepts/classes and their most fundamental relationships 2. refine the classes by specifying the sets of operations on them. 3. refine the classes by specifying their dependencies. 4. specify the interfaces. Typically several loops through this sequence are needed to produce a design one can comfortably use for an initial implementation or a re-implementation. Page 3 of 5 Good advice for every Software Designer Keep It Small and Simple - Dont solve problems that dont yet exist. - Solve the specific problem, not the general case but dont make needlessly it inflexible either - Keep the door open for extension through composition and inheritance - Use polymorphism to encapsulate need to know in specific derived classes, allowing clients to be blissfully ignorant, knowing only the base class protocol. - Design function code so that it: fits on a single page Decompose into smaller tasks - Break a complex operation into smaller simpler pieces. - if you cant say it well in English (Spanish, Bengali, Mandarin, ) you cant say well it in C++ - The act of writing out a description of what a program does, and what each component does, is a critical step in the thinking process, even if the result is just one or two pages. - If you cant write it clearly then you probably havent fully thought out either the problem or its solution. - When youre done, you have a specification - the only reasonable basis for testing. - Design is a decomposition process in the application domain. - Implementation is a re-composition process in the solution domain. Read code Read a lot of code. You learn by seeing how others write code. Look at as many samples of good code as you can. Look critically at your own code. Read several of the better trade journals, e.g., C++ report, C/C++ Users Journal, IEEE Computer Magazine, IEEE Software Magazine. Write a lot of code. When youre starting a big job, write small prototypes to try out your ideas and be prepared to throw them away or rebuild them before launching the final construction. Use an editors red pencil on your code. Strike out unnecessary code, simplify, reword, repartition, until youre reasonably satisfied. Be prepared to throw the first one away. Formatting and documentation Software should be self-describing: Unlike most other engineering disciplines, software has the ability, if well written, to capture, store, and disclose on demand, the technology used for its construction. Page 4 of 5 if you use specialized algorithms or technology place citations to references so others can understand how your code works. Uncommented code has no value: uncommented code is unmaintainable Every function should have a (brief) prologue - perhaps only a single line and comments to describe any subtle code. Comments Dont comment the obvious. Do put comments where they are needed: Once per file: provide prologue: state name of file, brief phrase describing contents, state language, platform, application, and author Once per function: state action discuss inputs and outputs only if type and format are not obvious put brief comments in code only if semantics are not obvious Diagrams Use diagrams in architecture concept documents: class...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Syracuse - SC - 504
Page 1 of 8Virtual functions Abstract ClassesVirtual functions are used to: 1. Make your programs more space efficient, and 2. To make true polymorphism possible. During inheritance, if you are refining the operation of a function that exists in t
Syracuse - SC - 504
Page 1 of 12Visual C+ 6.0 TutorialSource: M. Morrison 1.1 Working with Existing Files The following paragraphs describe the steps necessary to open, compile, execute, save, and print an existing C+ source code file. A source code file is a file th
Syracuse - SC - 504
Page 1 of 2Accepting command line argumentsIn C+ it is possible to accept command line arguments. To do so, you must first understand the full definition of void main(). It actually accepts two arguments, one is the number of command line argument
Syracuse - SC - 504
CIS504CIS 504 U001 Introduction to Programming : C+ Rohit Valsakumar sc504a@ecs.syr.edu SPRING 2003 Lab 13CIS5041CIS504LAB 13 This Lab session is about pointers in C+. / Simple Program demonstrating the use of pointers#include <iostream.h>
Syracuse - CSE - 758
Created by Ronghua WangSeed DocumentSome commonly asked questionsNote: Here I list some questions and my answers to some of the questions that many groups asked. I think other groups may also have such questions when they implement the system, s
Syracuse - SC - 504
CIS 504 U001 Introduction to Programming : C+ Rohit Valsakumar sc504a@ecs.syr.edu SPRING 2003 Lab 3LAB 3 In this lab you will learn how to use stream objects to read and write from a file Program 1:#include <iostream> / needed for cin and cout #in
Syracuse - CSE - 758
Created by Ronghua Wang (Syracuse University)Seed DocumentProcedures to build crypto libraries in MinixIn this document, we give step-by-step instructions on how to create a crypto library (libcrypt.a), and compile/link/build/run applications us
Syracuse - SC - 196
MAHABHARATA retold by C. RajagopalachariContents 1. Ganapati, the Scribe2. Devavrata3. Bhishma's Vow4. Amba And Bhishma5. Devayani And Kacha6. The Marriage Of Devayani7. Yayati8. Vidura9. Kunti Devi10. Death Of Pandu11. Bh
Syracuse - PHY - 211
Welcome back to Physics 211Today's agenda: Ch. 9 sections 9.3 through 9.6 Impulse and Momentum Ch. 8 E&P 10, 13, 20, 44 WHW11 Ch 8 # 23, 25, 31, Ch 9 # 7, 12 FHW11 Ch. 9 E&P 14, 15, 17, 20, 23, 24 WHW12 Ch. 9 E&P 25, 32, 38,48, 69 Read Ch. 10
Syracuse - PHY - 300
Lec6 Phase transitions, critical phenomena Magnetic systems - Ising model1Phase transitions Many systems composed of (very) many degrees of freedom exhibit phase transitions These are abrupt changes in the macroscopic state (appearance, prop
Syracuse - PHY - 300
Lec9 Intro to Quantum Mechanics Numerical solution of Schdinger's equao tion1Why/when quantum ? Newton's laws give a very accurate description of the behavior of everyday objects/motions. But they fail miserably to describe atoms ! This w
Syracuse - PHY - 300
Lab 8 Thursday 8 March 2006 - Due: Thursday 22 March In this lab we will explore some more features of the 2D Ising model. Specifically we will compute the correlation function of two spins as the critical temperature is approached. We will also inve
Syracuse - PHY - 102
Lecture #20Molecules: Covalent and Ionic bondsApril, 6thAnnouncements 1. Next week No workshop .Good Friday 2. Tuesday, April 11th, Quiz 4 (Lectures #18-20) 3. Thursday, April 13th, Review Meeting 3 4. Tuesday, April 18th, Exam 3Outline: 1.
Syracuse - PHY - 344
Jan. 2008Procedures for ExperimentsPhy 344/462Introduction: Your work in this course needs to be recorded in a laboratory notebook. Such a book is used by all experimental scientists. It is where grand concepts and minute details of experiments
Syracuse - PHY - 250
Physics 250 Physics Journal Workshop Course Information Spring 2007Instructor: Office: Phone: E-mail: Prof. Steve Blusk 327 Physics Building x-3158 sblusk@phy.syr.eduTime and Location: Tuesday, 5:15 pm, Room 204 Physics Building Course Descriptio
Syracuse - PHY - 102
Lecture #16Quantum Mechanics and PhotonsMarch, 23rdQuiz #3 will be given next Tuesday. Don't forget that you can drop one quiz out of four!Quantum Mechanics This is the modern model of light and matter. Review of Aspects of Last Lecture Einst
Syracuse - PHY - 361
Syracuse - PHY - 312
PH312 Relativity and Cosmology, Spring 2008 Homework 6 (Challenging!) Due 4/3/20081Try to think through the problems, and understand how what we've covered in lectures applies. It is extremely important that you write out logical and complete ans
Syracuse - AST - 101
Our Corner of the Universe AST101, Fall 2007STAR DIARYWeek of September 4The night sky has fascinated Man since the dawn of consciousness. It served as a source of information, reassurance, beauty and fear. The invention of electric lights has t
Syracuse - PHY - 211
Welcome back to Physics 211Today's agenda: Recall last class Changes and averages Complete Motion DiagramPhysics 211 Fall 2008Lecture 02-1Displacement Displacement is `distance plus direction' Displacement r is a vector quantity change
Syracuse - PHY - 216
Name _ Date: _PHY-216 Exam 2Instructions: There are 4 problems. Show all work. No explanation = no credit. You are free to ask questions if you are unsure as to what the question is asking.1.A long solenoid having radius a and n turns/m is con
Syracuse - PHY - 307
PHY307, Science and Computers I Waves Lab, Part II, December 3, 2002 (Parts I and II are due by end of lab Tuesday, December 3)Waves: strings and stripesSummary of what you will do [restated]: Waves are patterns that may vary in space or time. The
Syracuse - AST - 101
ASTRONOMY 101 OUR CORNER OF THE UNIVERSE FALL 2002 Course Staff & General InformationLecturer Prof. Carl Rosenzweig 319 Physics Building 443-5969 e-mail: rosez@phy.syr.edu Wednesday, 3:00-4:00 p.m., or by appointments Please bring your CLASS NOTES t
Syracuse - NYSAPS - 2002
Syracuse - PHY - 211
Physics 211, Spring 2006Practice before Exam 1Document your work or earn no credit. Use the back of each sheet if you run out of space. Cross over any parts that correspond to given up thoughts. 1. [20pts total] From the position-vs.-time graph g
Syracuse - AST - 104
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 209
Syracuse - PHY - 211
PHY211 Fall 2005 Final ExamName (please print): _ Last First SUID_ _It is very important that you print your name at the top of every exam page. Please do it before you read any questions! Document your work. There are portions of the problems on b
Syracuse - PHY - 211
Welcome back to Physics 211Todays agenda: Rotational dynamics Angular momentum Problems with moving axis of rotationPhysics 211 Fall 2006Lecture 12-11Current homework assignments WHW10: In blue Tutorials in Physics homework book HW-65
Syracuse - PHY - 211
Welcome to Physics 211!(General Physics I)Physics 211 Fall 2005Lecture 01-11SU PHY211Course staff: General Physics IFall 2005Lecturers: Prof. Simon Catterall (first 1/2 semester) smc@physics.syr.edu Prof. Britton Plourde (second 1/2
Syracuse - PHY - 211
Welcome back to Physics 211Today's agenda: summary of relativity so far events, frames, and spacetime intervalexamples relativistic mechanicsPhysics 211 Fall 2002Lecture 15-21Final Friday 13 Dec 10:15am -12:15pm here Comprehensive. (
Syracuse - PHY - 307
Orbital Precession of MercuryA little background Mercurys orbit rotates 5600 arc seconds per century, but 43 arc seconds per century was unaccounted for Newtonian physics couldnt explain the extra precession Einsteins General Relativity to the r
Syracuse - PHY - 307
Lec6 Chaos - logistic map Period doubling, strange attractors, fractals Sierpinski triangle, chaotic dynamics Fractal dimension1Logistic Map lab 5 Simplest example of chaotic dynamical system Exhibits period doubling approach to chaos
Syracuse - PHY - 307
Lec3 Graphing, multiple displays Many particles - Newtonian gravity Higher order integrators1Graphing So far we have used Python to animate a simulation of simple motion. For more quantitative work need to be able to plot aspects of the m
Syracuse - PHY - 307
Lec5 Nonlinear systems chaos Phase space, Poincare maps, strange attractors Period doubling Lorenz model, balls in boxes .1Real pendulumVariables (t), (t) equation of motion: d g d = - sin () - k + F sin (D t) dt l dt d = dt Integrate/s
Syracuse - PHY - 307
Lab 12 - The Ising ModelThursday 16 November, 2006 - Due: t.b.a. In this lab, you will study a simple model of ferromagnetism, called the Ising model. As always, please include in your writeup any sections of Python code you write. there was no Lab
Syracuse - PHY - 307
Lab 9 - Complex Dynamics: Julia SetsThursday 25 October, 2006 - Due: Thursday 3 November In this lab, you will take a closer look at a particular Complex Dynamical System, called a Julia Set. Since we will need complex numbers, you'll learn about wo
Syracuse - PHY - 307
Lab 10 - Sand[piles] and Earth[quakes]Thursday 2 November, 2006 - Due: Thursday 9 November In this lab, you will study aspects of self-organized critical phenomena, which have been used to study general universal properties of some interesting compl
Syracuse - PHY - 307
Lec1 - intro, basic tools Mechanics, syllabus General comments What is computational science ? Derivatives, integrals and root finding Intro to Python1General comments Not programming course. Not traditional physics course. Topics dra
Syracuse - PHY - 307
Lec12 Phase transitions, critical phenomena Magnetic systems - Ising model1Commerical break Next semester there will be a successor course PHY300 a.k.a PHY308 Tuesdays/Thursdays 12:30-1:50 pm (lab times to be decided) Similar to PHY307 wit
Syracuse - PHY - 307
Lab 7 - PercolationThursday 12 October, 2006 - Due: Thursday 19 October The aim of this lab is (1) to get you familiar with the computational implementation of a lattice and (2) to become familiar with some of the concepts in percolation. As for the
Syracuse - PHY - 307
Lab 5 - Chaotic DynamicsThursday 28 September, 2006 - Due: Thursday 05 October The aim of this lab is to explore some aspects of chaotic dynamics. First, we have another look at the Pendulum example presented in lecture. Then, we will study the Logi
Syracuse - PHY - 307
Lab 7 - PercolationThursday 12 October, 2006 - Due: Thursday 19 October The aim of this lab is (1) to get you familiar with the computational implementation of a lattice and (2) to become familiar with some of the concepts in percolation. As for the
Syracuse - PHY - 307
Lab 6 - Fractal DimensionThursday 05 October, 2006 - Due: Thursday 12 October We will take a closer look (pun intended) at the self-similar Sierpinski Triangle. Then, youll modify the parameters of the dynamical model to obtain a dierent fractal. Fi
Syracuse - PHY - 307
Homework 6Due: Thursday 12 October In this homework you will investigate another discrete time nonlinear dynamics the Henon map. It is similar to the Sierpinski map as it involves two dynamical variables x and y. The update equation is xn+1 = yn +
Syracuse - PHY - 307
Lab 3 - Modeling the Solar System (part I)Thursday 14 September, 2006 - Due: Thursday 21 September The aim of this lab is to get you started with the construction of a solar system, using some of the ideas that you have already been introduced to. I
Syracuse - PHY - 307
Homework 3Due: Thursday 21 September 1. In Lab3 you constructed a table showing the error in the energy of a harmonic oscillator as a function of the time step dt for the Euler algorithm. In lecture 3 we discussed an improved algorithm the leapfrog
Syracuse - PHY - 307
Homework 21. Cut/paste the code for the projectile problem discussed in class (note: that listing is not quite complete: you will need to look at earlier codes to see how to access the 3D environment and how to set the scaling and range). 2. Modify
Syracuse - PHY - 307
Lec2 - mechanics and simple simulation Newtons laws, Euler method 1D and 2D examples: projectiles, harmonic motion, damping Simulation code and graphics More on functions1Newtons lawsOne particle, one dimension: dx = v dt dv = a = F/m dt
Syracuse - PHY - 307
Homework 11. Tabulate the values of the symmetric dierence approximation to the derivative for the functions f = sin x at x = 0.1 and f = x2 for x = 2 using step sizes h = 0.1, 0.01, 0.001, 0.0001. You may simply edit the Python program given in cla
Syracuse - PHY - 307
Homework 10Due: Thursday 9 November Choose a topic for your class project. Hand in the title of your topic together with a brief (one paragraph) description of what you intend to do. Please see me if you would like help choosing a topic.1
Syracuse - PHY - 307
Homework 4Due: Thursday 28 September For this homework you will use your codes solar.py and integrator.py from lab4 to investigate the motion of a object near a black hole (or any object with a strong gravitational field). In this case the leading c