Visual C++ Programming: Concepts and Projects Chapter 10B: Recursion (Tutorial)

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING I Apply Procedures to Develop Menus,
Advertisements

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Migrating to GUI Conference Migrating to GUI How do you get there from here?
Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes.
Multimedia Authoring - Chapter 6 - Part I1 Multimedia Authoring Using Various Tools - Part I: ToolBook M.Dastbaz Designing Interactive Multimedia Systems.
Chapter 13: Advanced GUI and Graphics
Visual C++ Programming: Concepts and Projects
Creating Menu. Objectives Create a menu system for a form –Create a menu –Create a menu titles –Create a menu items –Create a submenu –Modify menu –Edit.
CIS 310: Visual Programming, Spring 2007 Western State College Welcome to 310 Visual Programming Spring, 2008.
Circles Math Task This presentation is for students who were absent from class and need some assistance.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Ten String Manipulation and Menus.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Visual Basic Chapter 1 Mr. Wangler.
Chapter 3 Working with Symbols and Interactivity.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Page 1 Simple PowerPoint Menus Section 1 Section 3 Section 2 Tutorial.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Chapter 8: Writing Graphical User Interfaces
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Display Ratios The Student Union displays have ratios of 16:9 Most computer displays have ratios of 4:3 This often distorts graphics when they are changed.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
XP New Perspectives on Microsoft Word 2002 Tutorial 31 Microsoft Word 2002 Tutorial 3 – Creating a Multiple-Page Report.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 1 1 Microsoft Office FrontPage 2003 Tutorial 1 – Creating a Web Site.
Programming with Visual C++: Concepts and Projects Chapter 3B: Integral Data (Tutorial)
XP New Perspectives on Microsoft PowerPoint 2002 Tutorial 2 1 Microsoft PowerPoint 2002 Tutorial 2 – Applying and Modifying Text and Graphic Objects.
1 Chapter Eleven Handling Events. 2 Objectives Learn about delegates How to create composed delegates How to handle events How to use the built-in EventHandler.
SWING IF YOU GET LOST - IMPORTANT LINKS  Swing articles:
Chapter Two Creating a First Project in Visual Basic.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Visual C++ Programming: Concepts and Projects Chapter 11B: Pointers (Tutorial)
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Visual C++ Programming: Concepts and Projects Chapter 12B: Linked List (Tutorial)
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 6B Methods (Tutorial)
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 5A Repetition (Concepts)
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
Foundation year Practical Lec.5: Practical Lec.5: Presentation Software Using Microsoft Office 2007 Practical Lec.5: Practical Lec.5: Presentation Software.
A mind map is a diagram used to visually outline information. A mind map is often created around a single word or text, placed in the centre, to which.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 3B Integral Data (Tutorial)
Programming with Visual C++: Concepts and Projects Chapter 4B: Selection (Tutorial)
As we upgrade from ImageNow 6.1 to ImageNow 6.3, there are some changes to the interface that the end-users will see. These slides cover changes to the.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
Visual C++ Programming: Concepts and Projects Chapter 10A: Recursion (Concepts)
Visual Basic.NET BASICS Lesson 14 Menus and Printing.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
2-1 Chapter 2 Using VB.NET to Create a First Solution.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 10A Recursion (Concepts)
Visual C++ Programming: Concepts and Projects
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Working in the Forms Developer Environment
Chapter 2 Visual Basic Interface
Tutorial 3 – Creating a Multiple-Page Report
Visual Basic Programming Chapter Four Notes Working with Variables, Constants, Data Types, and Expressions GROUPBOX CONTROL The _____________________________________.
I WILL PUT MY OWN HEADING HERE IN ARIAL REGULAR CAPITALS
I WILL PUT MY OWN HEADING HERE IN ARIAL REGULAR CAPITALS
I WILL PUT MY OWN HEADING HERE IN ARIAL REGULAR CAPITALS
Working with Symbols and Interactivity
STEP ONE. STEP ONE. STEP ONE. STEP ONE. STEP ONE. 02
YOUR text YOUR text YOUR text YOUR text
Presentation transcript:

Visual C++ Programming: Concepts and Projects Chapter 10B: Recursion (Tutorial)

Tutorial: Generating a Fractal Image Problem Analysis – This project uses the recursive DrawBranch() method – The result will be an interface upon which one branch, with its recursive subbranches, is drawn – On Your Own tasks will allow more options – The program can easily be developed to have four central branches Programming with Visual C++2

Problem Analysis Programming with Visual C++3

Design Interface – Menus are created using the MenuStrip control – Menu items are named after the text they contain – If the text is numeric, the menu item names default to numbered order – Menus control stopping the program and setting the maximum levels of recursion Programming with Visual C++4

Design (continued) Programming with Visual C++5

Design (continued) Programming with Visual C++6

Design (continued) Programming with Visual C++7

Design (continued) Programming with Visual C++8 Each menuItem requires a Click() event

Design (continued) Programming with Visual C++9 Instance variables

Design (continued) Programming with Visual C++10 Required Graphics and Drawing objects

Design (continued) Programming with Visual C++11 Data table for DrawBranch()

Design (continued) Programming with Visual C++12 Algorithms – For menu items that set maxLevels

Design (continued) Programming with Visual C++13 Algorithm for DrawFractal()

Design (continued) Programming with Visual C++14 Algorithm for method DrawBranch()

Design (continued) Programming with Visual C++15

Design (continued) Programming with Visual C++16

Design (continued) Programming with Visual C++17

Design (continued) Programming with Visual C++18

Design (continued) Programming with Visual C++19

Design (continued) Programming with Visual C++20

Design (continued) Programming with Visual C++21

Development Create the interface – Menus The menuStrip control is used to add menuStrip features to the program The “Type here” labels indicate where menu headings and items can be created Programming with Visual C++22

Development (continued) Programming with Visual C++23

Development (continued) Menus – Menu headings are placed at the top level of each menu – Menu items are listed below Programming with Visual C++24

Development (continued) Programming with Visual C++25

Development (continued) Programming with Visual C++26

Development (continued) Declare instance variables and objects Programming with Visual C++27

Development (continued) Initialization in Form1_Load() Programming with Visual C++28

Development (continued) Coding the Exit menu Programming with Visual C++29

Development (continued) Coding the level menu items Programming with Visual C++30

Development (continued) Programming with Visual C++31

Development (continued) Coding DrawFractal() Programming with Visual C++32

Development (continued) Calling DrawBranch() Programming with Visual C++33

Development (continued) Programming with Visual C++34

Testing Demonstrate that each level works correctly Demonstrate that the Exit menu works Programming with Visual C++35

Testing (continued) Programming with Visual C++36

Analysis The number of recursive calls is factorial The number of executions of DrawBranch() is O(3 n ) – n is maxLevels-1 This program would demand considerable resources to complete a drawing involving a high number of levels Programming with Visual C++37

Analysis (continued) Programming with Visual C++38

On Your Own More central branches – Add three more central branches Add an angle menu – Varying the angle produces different fractal images Programming with Visual C++39

On Your Own (continued) Programming with Visual C++40

On Your Own (continued) Programming with Visual C++41