1 / 10

Class 4: Repetition

Class 4: Repetition. Pretest Condition tested before block of code to repeat If condition is false initially, the block never executes Posttest Condition tested after block of code to repeat Block of code will always execute at least once Counting Repeat for a specified number of times

aerona
Download Presentation

Class 4: Repetition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Class 4: Repetition • Pretest • Condition tested before block of code to repeat • If condition is false initially, the block never executes • Posttest • Condition tested after block of code to repeat • Block of code will always execute at least once • Counting • Repeat for a specified number of times • Flowchart these!

  2. Last Class Tomorrow: Show Time! • Using the overhead, demonstrate your project: • Show your design in the form of pseudocode, flowcharts, and a verbal description of your goal. • Show your code - each method which will contain comments describing the task of each method. • Demonstrate your program by running it a few times. • Answer questions from the audience (us). • Audience will make suggestions for improving your project. • You will be required for the final exam, which will be on July 25, to describe how you improved your program. • You will also be required to implement improvements for the final demonstration on July 25.

  3. What have we learned this week? • Polya’s Problem-Solving Methodology • Computer Programming • Control Structure • Objects • Events

  4. What does Polya teach us? How can we use this? For what? Other classes? Real life? How does it help us to make good programs? Understand the Problem Devise a Solution Implement the Solution Evaluate the Solution Polya’s Problem-Solving Methodology

  5. Computer Programming • Events • Control Structures • Objects

  6. Events • Give some examples. • When do you use events in a program? • How are you using events?

  7. The Three Control Structures:How are you using each of these in your program? • Sequence • Decision or Selection • Repetition or Loops

  8. Objects • What does an object have? • Properties • Methods • What objects do you have? • What are some properties? • What are some methods?

  9. What else is there to learn about computer programming? • Variables • Constants • Passing Parameters • List Data Structures • Dynamic Data Structures • Multiple Threads • Recursion • And More…

  10. Quiz 4: Add comments to your code which match your goals and design. Email this to me:dmckinnney@usouthal.edu

More Related