130 likes | 143 Views
Miracle is a program that helps you understand programming concepts, making it easy to learn and apply to multiple programming languages. It provides a template to write programs and focuses on key ideas, reducing concerns about syntax.
E N D
CSCI N201 Programming Concepts and Database 6 – Miracle And “Hello World” Lingma Acheson linglu@iupui.edu Department of Computer and Information Science, IUPUI
Programming Concepts • Learn general ideas, rules • Learn programming without learning a specific language • Able to apply to many programming languages • Making learning a new language easy
What Is Miracle • A piece of program that is used to help understand the programming concepts • A template one can use to write programs • “The art of programming without programming”
Goals of Miracle • Learn programming “concepts” • Concentrate on key ideas in programming • Reduce concerns about syntax • Assist in development of code • Illustrate chief ideas • Create working programs when we finish the topic!
Using Miracle • All main ideas of programming are in menus • Each concept has some parameters • Choose a command, enter parameters at prompt • Code will be created for you automatically
“Hello World” • Write a program that says “Hello World” • http://www.cs.iupui.edu/~aharris/MirJS.html • Concepts: • Make a new program • Give your program a • NAME • AUTHOR • DATE • PURPOSE • Give an output • “Hello World” • End the program • Run the program
Using the Miracle Summary • http://www.cs.iupui.edu/~aharris/n301/miracleSum.html • First column is programming concept • Second column is description • Third is parameters • Fourth describes parameters
STAIR and Miracle • STAIR is especially helpful when writing computer programs • STAIR steps refined to handle programming
S-State the Problem • What is the task? • S:
T-Tools I • Look at the first column of the Miracle Summary • Look at each tool and decide if you think it will be promising • Write down the tool name if you think it applies • T:
A – Algorithm • For each tool, write a sentence like the one in the second colum of the guide • Fill in parameters with your own values • Write any way you wish as long as all parameters are described • A:
I – Implementation • Use Miracle to enter the data. You'll be asked for each parameter • I:
R-Refinement • What went wrong? • Can you find the problem? • Can you repair it? • Repeat until successful