Graphics and Procedures Programming Right from the Start with Visual Basic.NET 1/e 5.

Slides:



Advertisements
Similar presentations
Procedural programming in Java
Advertisements

AA high level programming language. IIt is created by Microsoft. UUses a graphical environment called the Integrated Development Environment (IDE).
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
New Mexico Computer Science For All
Thirteen recursion. Recursion ► [define horizontal-array [object spacing count → [if [= count 1] object [group object [translate [point spacing 0] [horizontal-array.
Four simple expressions in meta. Data objects Pieces of data in a computer are called objects Today, we’ll talk about four kinds of objects Numbers Pictures.
Copyright 2008 by Pearson Education Building Java Programs Graphics Reading: Supplement 3G.
Copyright 2006 by Pearson Education 1 Building Java Programs Supplement 3G: Graphics.
Four simple expressions in meta. Data objects Pieces of data in a computer are called objects Today, we’ll talk about four kinds of objects Numbers Pictures.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
Introducing Scratch the Cat
Chapter 11 An Introduction to Visual Basic 2008 Why Windows and Why Visual Basic How You Develop a Visual Basic Application The Different Versions of Visual.
Programming Right from the Start with Visual Basic .NET 1/e
Microsoft® Small Basic
CMPS 211 JavaScript Topic 2 Functions and Arrays.
Hello, little turtles. Hello, little turtles! There are many modules in Python that provide very powerful feature that we can use in our own program.
Logo For beginners By Dali Matthews 9S What is logo?
Advanced Object- Oriented Programming Programming Right from the Start with Visual Basic.NET 1/e 14.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
CONTROL SYSTEMS Control Systems A command is a directive that performs a specific task An argument is a variable that can be used by the function reveiving.
The Hare Raising Experience of Logo in the Classroom
1 Building Java Programs Supplement 3G: Graphics These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may not be rehosted, sold,
PLT Final Project---COLOGO Lixing Dong, Zhou Ma, Chao Song, Siyuan Lu, Dongyang Jiang.
Algorithms Writing instructions in the order they should execute.
The Professional Touch Programming Right from the Start with Visual Basic.NET 1/e 10.
Intelligent Systems Programming Right from the Start with Visual Basic.NET 1/e 15.
Databases and ADO.NET Programming Right from the Start with Visual Basic.NET 1/e 11.
1 Project designed and created by M. Shajith Kumar.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
 Make sure you are subscribed to announcements on Moodle.  Activity 5 will be due before the beginning of lab next week.  Check Moodle for complete.
PART TWO Electronic Color & RGB values 1. Electronic Color Computer Monitors: Use light in 3 colors to create images on the screen Monitors use RED, GREEN,
Programming in Alice IT-IDT-9 Design, develop, test and implement programs using visual programming. 9.1 Utilize drag and drop software to develop programs.
Visual C++ Programming: Concepts and Projects Chapter 10A: Recursion (Concepts)
Turtle Graphics Lesson 2 1. There are 3 homeworks to complete during the six lessons of this unit. Your teacher will let you know when a homework has.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
An Introduction to Programming Using Alice 2.2, Second Edition Chapter 7 Recursive Algorithms.
Visual Basic.NET BASICS Lesson 9 Nested If Statements and Radio Buttons.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 10A Recursion (Concepts)
Functions. functions – learning targets I will be able to understand how to trace function I will be able to learn how to lavage inputs and outputs with.
Introduction to Programming in C++ Seventh Edition Chapter 1: An Introduction to Programming.
JavaScript: API’s, Parameters and Creating Functions with Parameters
Python Turtle Graphics
Computer Programming.
LOGO BY Kaotip 9S.
Scratch: iteration / repetition / loops
Building Java Programs
Problem Solving (design of programs) CS140: Introduction to Computing 1 8/26/13.
Learning to program with Logo
Algorithms and Flow Charts
VISUAL BASIC – CHAPTER ONE NOTES An Introduction to Visual Basic
Creating Functions with Parameters
Module 2 Lesson 3 Over and Over Again
Looping and Random Numbers
Unit 3: Lesson 9-Looping and Random Numbers
Hour of Code.
Mod 2 Lesson 2 Repeating with loops
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
Building Java Programs
Flow of Control.
Turn to Page S.89 Challenging Question
Module 2 Lesson 3 Over and Over Again
Building Java Programs
Module 2 Lesson 3 Over and Over Again
Hour of Code Code.org/lightbot
Building Java Programs
Graphics Reading: Supplement 3G
Presentation transcript:

Graphics and Procedures Programming Right from the Start with Visual Basic.NET 1/e 5

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 2 Objectives Learn the Visual Logic graphics commands and how they work Appreciate the concept of structured design Know the process for creating procedures

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 3 Objectives (cont.) Understand the role of procedure arguments Realize the difference between formal arguments and actual arguments Develop and evaluate solutions that utilize graphics and procedures

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Graphics Visual Logic graphics are a variation on Logo Programming Language, which has been used in educational settings for over three decades.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 5 Forward and Turn Right The Forward command moves the pen a specified number of units. The Turn Right command rotates the drawing direction a specified number of degrees.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 6 Using Loops Two Patterns Emerge… –Repetition of the commands Forward and Turn Right –The degrees the drawing direction must turn right are different for each shape and are based on the number of sides in the shape

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Working with Color The pen draws with black ink and is 1 unit in width. Visual Logic provides commands for changing the pen’s color and width.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 8 Set Color and Pen Width The Set Color command allows the developer to select any color from the standard color dialog box. The Pen Width command changes the thickness of the drawing pen.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 9 Color Forward The Color Forward command moves the pen through the three base colors of red, green, and blue. The Color Forward command typically occurs inside a loop.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Structured Design Using Procedures Structured design means a problem is broken into smaller pieces, each of which is solved individually. A procedure is a series of instructions that are grouped together and treated as a single unit.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Structured Design Using Procedures (cont.)

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 12 Rotating Flags Problem

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 13 Rotating Flags Problem (cont.)

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Procedures with Arguments An argument (or parameter) is a piece of information that is communicated between the calling code and the procedure. The argument is referred to as an actual argument at the time of the call and as a formal argument in the called procedure.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 15 Rotating Shapes Program

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 16 Visual Logic Implementation

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall Recursion A recursive procedure is a procedure that calls itself. To prevent infinite recursion, a recursive procedure typically first performs a test on one of its arguments to check for a base case.

Crews/Murphy – Programming Right from the Start with Visual Basic.NET 1/e – ©2004 Prentice Hall 18 Chapter Summary Visual Logic graphics include commands, such as Forward and Right, that move a virtual pen across the screen. Procedures allow code to be written once and called many times. An actual argument is a value or reference passed from the calling code to a procedure.

Graphics and Procedures Programming Right from the Start with Visual Basic.NET 1/e 5