Lecture 6 - Flowcharting

Lecture 6 - Flowcharting - mm wall thickness mm and density...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1/27/2010 1 TODAY’S TOPICS : : Flowcharting Programming Engr 160 Flowcharting How will learning this help me? Flowcharts help you organize a program Flowcharts will help you plan out the logic of your programs Flowcharts are a graphical representation of a program Free Associations with this Topic Engr 160
Image of page 1

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

View Full Document Right Arrow Icon
1/27/2010 2 Flowchart Symbols Enter data or output data Perform a calculation Make a decision (branch) Loop (repeat a part of the program) A smaller program within a larger program (sub-program, function, subroutine) Go to this symbol to find the next part of the program Engr 160 I/O A Flowchart Symbols Begin/End the program Off page connector • Comments Engr 160 Begin B comments
Image of page 2
1/27/2010 3 Sample Flowchart Calculate the mass of a hollow aluminum sphere. The user (person using the program) should be prompted for outer diameter in
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mm, wall thickness, mm, and density, in kg/m 3 • Print out the mass in kg/m 3 • d O = 260 mm, t = 3.10 mm, density_Al = 2640 kg/m 3 • Density water = 1000 kg/m 3 Engr 160 Engr 160 1/27/2010 4 In Class Assignment Make flowchart that represents a program which will do the following: 1. Prompts the user for his or her name 2. Asks the user to input two coordinates, (x 1 , y 1 ) and (x 2 , y 2 ) 3. Calculates the slope, m, and prints it out to the user 4. Calculates the y-intercept, b, and prints it out to the user 5. Asks the user if he or she wishes to compute a new slope and y-intercept 1. If the answer is yes, then the program should go back to the point where the coordinates are asked for 2. If the answer is no, then the program should end Engr 160...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern