CHE110-L06 - Programming Concepts & Introduction to...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Department of Chemical Engineering Programming Concepts & Introduction to Visual Basic for Applications CHE110 Introduction to Programming & Problem Solving
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Department of Chemical Engineering Desirable Elements of a Computer Program • Well-defined purpose • Modular in design •E a s y t o r e a d • Reusable
Background image of page 2
Department of Chemical Engineering Structured Programming Top-Down Design Approach – specify “ big picture ” functionality first – continue with sequential refinement of sub-tasks – code-writing is last step Code Structure Types – blocks of code executed once ( sequences ) – conditionally-executed blocks of code ( decisions ) – repeatedly-executed blocks of code ( loops )
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Department of Chemical Engineering Simple Example of Top-Down Design PROGRAM Purpose: Compute the center-of-mass of a collection of objects in two dimensions. x y m ░░░░░ ░░░░░ ░░░░░ x m ,y m y m total x m total M x m M y m = = n yi i i1 n xi i n total i Mm x y mm = = = = = =
Background image of page 4
Department of Chemical Engineering Simple Example of Top-Down Design PROGRAM Purpose: Compute the center-of-mass of a collection of objects in two dimensions. x y m ░░░░░ ░░░░░ ░░░░░ x m ,y m Read in data Compute Moments Compute Total Mass Compute x m ,y m Output Results
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2009 for the course CHE 101 taught by Professor Coronel during the Spring '06 term at Rose-Hulman.

Page1 / 22

CHE110-L06 - Programming Concepts & Introduction to...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online