CRE Programming Club Class 3 (Install Small Basic on the new computers! Double-click on I:/smallbasic.msi)

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

Introduction to Macromedia Director 8.5 – Lingo
Getting Started With Alice By Ruthie Tucker under the direction of Prof. Susan Rodger Duke University, July
1. Tuesday: Halloween Shoot due TOMORROW. You must make a contact sheet of your photos and print it from my computer tomorrow. -5 pts for every day I don’t.
Events Chapter 7. Interactivity The real world is interactive User determines order of actions instead of programmer.
Write Your First Computer Game!. Coding: Programming Languages Just like you can speak Chinese to someone who understands Chinese to tell them what to.
CS 106 Introduction to Computer Science I 09 / 25 / 2006 Instructor: Michael Eckmann.
10-Jun-15 Using Objects. 2 Overview In this presentation we will discuss: Classes and objects Methods for objects Printing results.
Alice Variables Pepper. Set to Java look Edit / preferences restart.
28-Jun-15 Using Objects. 2 Overview In this presentation we will discuss: Classes and objects Methods for objects Printing results.
29-Jun-15 Using Objects. 2 Classes and objects The type of an object is the class that describes that object If we say int count, the type of count is.
ABC’s of PowerPoint (Office 2007) Part 1: Basic Vocabulary Part 2: Cursors Part 3: Insert Your Text Part 4: Insert Your Pictures Part 5: Basic Tools &
Blackboard student guidepage 1 of 21 Blackboard Basics – finding your way  this guide explains how to find your way around a Blackboard course.  click.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Conversational Computers
Graphical User Interfaces A Quick Outlook. Interface Many methods to create and “interface” with the user 2 most common interface methods: – Console –
Multiplication and Division Addition and Subtraction PracticeExponentsParenthesesHomeQuizIntroduction Objective and Standards Please Excuse My Dear Aunt.
Simplifying Rational Expressions – Part I
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
Apply Sub Procedures/Methods and User Defined Functions
INTRODUCTION TO THE SCRATCH PROGRAMMING ENVIRONMENT.
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
In.  This presentation will only make sense if you view it in presentation mode (hit F5). If you don’t do that there will be multiple slides that are.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
Orchard, Let’s Get Started Students ! In 4 Easy Steps!
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 9, 2015)
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #002 (January 17, 2015)
Silent Movie. Visual story telling Rules Create a ppt of five pictures or more that tell a story You cannot use a known story but the story could be.
Fall Week 3 CSCI-141 Scott C. Johnson.  Say we want to draw the following figure ◦ How would we go about doing this?
CS 450: COMPUTER GRAPHICS PORTRAIT OF AN OPENGL PROGRAM SPRING 2015 DR. MICHAEL J. REALE.
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Welcome to the CRE Programming Club! Robert Eckstein and Robert Heard.
Intro to More Controls in C#. C# Demonstration We already touched on labels and buttons Ad-hoc demo of controls – Textboxes Multiline – Checkbox – Radiobutton.
Intro to More Controls in C#. C# Demonstration We already touched on labels and buttons Ad-hoc demo of controls – Textboxes Multiline – Checkbox – Radiobutton.
CRE Programming Club - Class 4 Robert Eckstein and Robert Heard.
Working With Objects Tonga Institute of Higher Education.
Lecture 4 Looping. Building on the foundation Now that we know a little about  cout  cin  math operators  boolean operators  making decisions using.
Welcome to Mrs. DeRita’s 4 th & 5 th grade Technology class I AM GLAD THAT YOU ARE HERE.
Loops & Graphics IP 10 Mr. Mellesmoen Recall Earlier we wrote a program listing numbers from 1 – 24 i=1 start: TextWindow.WriteLine(i) i=i+1 If.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 17, 2015)
What is Programming? Computer programming is about telling the computer what it is we want it to do We tell the computer what we want it to do by sending.
CSC 157 (Blum)1 Hello World. CSC 157 (Blum)2 Start/Programs/Microsoft Visual Studio.NET 2003/Microsoft Visual Studio.NET 2003.
1 CS161 Introduction to Computer Science Topic #9.
CS 106 Introduction to Computer Science I 09 / 26 / 2007 Instructor: Michael Eckmann.
Revolutionary War Project. You will be doing a research project about the Revolutionary War. You will research people, battles, and events. This project.
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
CRE Programming Club - Class 2 Robert Eckstein and Robert Heard.
Mrs. Jones told the boys and girls that they were going to learn how to subtract numbers today. Jane wasn’t happy because math was hard for her. She had.
CRE Programming Club Class 8 Robert Eckstein and Robert Heard.
CRE Programming Club - Class 5 Robert Eckstein and Robert Heard.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Lecture 7 Conditional Scripting and Importing/Exporting.
Controlling Program Flow with Decision Structures.
CRE Programming Club Class 2 (Import JJZ543 and Practice Your Typing!)
Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010.
M1G Introduction to Programming 2 2. Creating Classes: Game and Player.
HTML HTML stands for Hyper Text Markup Language. HTML is used in making the base of a Website You can just use an online website maker like weebly.com.
Left Brain-Right Brain Test Objective: Students will complete a test to determine whether they are a right-brain or left-brain person.
CRE Programming Club - Class 3 Robert Eckstein and Robert Heard.
Introduction to Exceptions in Java CS201, SW Development Methods.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Tarik Booker CS 120 California State University, Los Angeles.
Scratch for Interactivity
PYGAME.
Alice Variables Pepper.
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Presentation transcript:

CRE Programming Club Class 3 (Install Small Basic on the new computers! Double-click on I:/smallbasic.msi)

Point of Execution This tells the exact point where the program is executing. A program will execute line by line. When it finishes one line (a statement), it moves onto the next. And the next. And the next. And it keeps going, unless you tell it to go somewhere else in the program. So if I tell it later that A = 21, then 20 gets thrown away, and A now equals 21.

No Confusion So, the important thing to remember here is: a program won’t do what it’s told to do UNTIL IT GETS to that line, and when it gets done executing that line, THE COMPUTER HAS DONE IT.

Let’s Learn About Objects In the world of programming, objects are very important. In fact, about 25 years ago, they changed programming forever. What’s an object? Well, its easier to explain what an object contains....

Properties What are properties? Properties are the variables or the constants that the object has.

Operations Operations are things that the object can do, usually with the help of the properties. You can tell an operation as it is always followed by parenthesis.

Events Events are things that happen outside our program that it may want to be aware of, such as the mouse moving or clicking, or a key being pressed on the keyboard. You may need to “handle” them.

What’s the Difference Between Operations and Events? Operations are something we make happen. Events are something that something else (outside the program) makes happen...and we want to know about it!

Let’s Take a Practical Example.... What are some properties of my daughter Lauren: Hair color Age She has two eyes

What Are Some Operations? Jump up and down the number of times of your age Brush your hair Tell us how many eyes you have

What Are Some Events? She is sick She is hurt on the playground A boy kissed Lauren (I really want to know this!) Remember that events are not operations! Operations are things that our program makes happen. Events happen outside the program, and the program needs to know about them.

Know the Docs Look online at TextWindow documentation (Reference Documention on smallbasic.com) Also, did you notice that when you were typing in TextWindow, the Intellisense also tried to guess what you wanted. If you choose TextWindow, it will display all the properties, events, and operations that an object has. So, TextWindow has properties like “Title”. It has operations like “WriteText” and “Read”. It doesn’t have events.

Go to smallbasic.com and click on Reference Documentation...

Accessing Objects We get ahold of properties, events, and operations by writing the name of the object, followed by a dot, followed by the name of the property, event, or operation. So, for example. Math.PI (constant) TextWindow.Title = “My Program” (variable) TextWindow.writeLine(...) (operation) TextWindow.readLine() (operation) TextWindow.clear() (operation)

Operations With operations, we can give information to it by putting it inside parenthesis. In fact, if you look at the object documentation, many operations expect one or more things to be passed to it. On the first day, what did we pass into TextWindow.writeLine()?

Operations Some operations will also return something. We can get ahold of it by assigning the return value to a variable. It looks something like this: shapeName = GraphicsWindow.addEllipse(5,5) You can pass in a more than one thing to an operation, but operations in Small Basic will only return one thing.

Using the Small Basic Classes Many programs use some of the Math functions, as well as some of the Clock functions. Clock.getMonth() Clock.getDay() Clock.getCurrentTimeMillis() What is the last one good for? We can use it as sort of a stopwatch, to figure out how long something in our program is taking.

Import VJC505 This is your second homework assignment. Complete the first six variables by obtaining their values from the Clock object. Use the TextWindow.WriteLine() command to print out the results. Questions? Send me an at

Import MCL293 This is your second homework assignment. This program uses the GraphicsWindow object to create a graphics window to draw on. It sizes it, draws “Hello There”, and makes it visible. Use other operations and properties in GraphicsWindow to make this more interesting. I don’t care how. Questions? Send me an at

Next Time.... We’re going to learn about flow control!