From real problem to Computer program? You now what You want to do, but how to make it with a C-program?

Slides:



Advertisements
Similar presentations
The Mulberry Bush Copyright 2009 Preschool Sunday School Central Flip Chart for the Entire Song.
Advertisements

DAILY ROUTINES What do you do every day? 1.
Chapter 8 Structuring Requirements Logic Modeling.
WEDDING in TAIWAN WEDDING in TAIWAN Tomoko Sakamoto Miki Shirai Miki Torii Tomoi Fujita.
Från verkligt problem till Datorprogram? Du vet vad Du vill göra, men hur kommer man till ett färdigt C-program?
Control Systems Computer Control Systems make devices and machines do what we want them to do in the right order and at the right time. Objectives: What.
Morning routine Structure diagram ”Morningwhile has gold in mouthd” Get dressed Eat breakfastGo to school Time Division By 2IT Data students …
Structured thinking Part 1: 1. Introduction 2. Structure Diagram 3. Comparison Part 2: 4. Examples 5. Rules 7. More examples Part 3: 8. Structure - pseudocode.
William Sandqvist Structure diagram Division Time ”Morningwhile has gold in mouthd” Morning routine Get dressed Eat breakfastGo to school.
E.V.S Safety on the road & Traffic Signal
Intro to Programming CST JavaScript. Objectives Define software Identify the different types of software Differentiate the different types of programming.
In Europe.  Polish wedding tradition is right invite guests.  Farewell party to the groom is the time when he says goodbye to his bachelor friends.
Welcome to Open House! MR. Smrekar and Mrs. Bond.
A RIDE TO REMEMBER Name:________________ Section: _____.
Created by Verna C. Rentsch and Joyce Cooling Nelson School
 You will choose 2 writing prompts and write 2 different paragraphs and choose 2 paragraphs to read.
By Jean Y. C. Hsiao. Every year in December people celebrate the birthday of Jesus Christ. That’s why we call this time “Christmas.” People celebrate.
Year 9 OCR Entry Level Computing.  On Microsoft word, write out the steps you take to get to school of a morning….  The first one will be “Wake Up”
It Is Easier To Build A Child Than Fix An Adult ❶ Young Adult Survey ❷ Development Study ❸ “I don’t force my child to go to church because they might.
12-CRS-0106 REVISED 8 FEB 2013 KUG1C3 Dasar Algoritma dan Pemrograman.
Introduction to Algorithms Engineering 1D04, Teaching Session 1.
Make a list. 1 、 Are there any rules at home? 2 、 What can you do? 3 、 What can’t you do? 4 、 And what do you have to do? Don’t talk loudly. Don’t watch.
Daily routine of an engineer Javier Oñate Lagos 27 years old.
Christmas Traditions By: Cara Edenfield groupbygroup.wordpress.com.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 2 I Am Not a Control Freak!
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
IN PLAY ON UNDER ABOVE BEHIND BETWEEN IN FRONT OF NEXT TO.
“RUDE” (Magic) Age: Teens & Adults Grammar Focus: First Conditionals.
COMMAS and SEMICOLONS.
BACK to the BASICS Roll ‘Em COUNT Me In Multiplier?Grab.
He sends gifts to good children on Christmas Eve. He says: “ Ho, Merry Christmas.” He always wears red suits.
Writing Skills Writing a comment.
Christmas Jeopardy Jeopardy 100 Christmas Choose an Answer Scrambled Talk to the ALT Random Challenges
Good Choices Make Good Friends A Think Before You Act Game.
Why is pink or purple a color for girls and blue or brown for boys? The answer depends largely _________ cultural values as well as personal experiences.
The 25th of December is Christmas Day. It is a religious holiday. We celebrate the birth of Jesus Christ.
Punctuation Commas Mme Adèle. How do you effectively use commas when writing? We will look at a series of rules developed by author Jane Staus in order.
Programming. In your own words, explain what an algorithm is, and give an example of how people use algorithms every day.
Daily Routine.  to talk about our daily routine (everyday activities, things we do every day; habits)  to practise Present Simple in speech Our Goals:
Santa Claus When Santa comes to our house to bring presents, we leave him and his reindeer cookies and milk!
Test-taking Tips for the Level 1 Writing Final. You will not know the exact topics on the writing final until the day of your exam.
12 th grade. College Essay Draft #2 In groups of 4: You will be given 4 different roles. You must complete your role in 10 minutes. Then switch when you.
Christmas. Christmas Dinner For many families Christmas dinner is very similar or identical to Thanksgiving dinner. They eat a roast turkey. In some families,
By the end of this session you should be able to... Understand what is meant by ‘thinking logically’ including: Identify the points in a solution where.
Warm up-VOICE OFF Practice sheets are DUE TODAY Review Unit 7 quiz today. Practice with partner morning routine, and then write afternoon (school schedule.
QUANTIFIERS. QUANTIFIERS What are quantifiers? words that are used to state quantity or amount of something without stating the exact number answer.
GIANT TWISTER!.
Present Continuous.
Unit 3 Clothes.
Welcome Mathematics workshop.
I am big and I am small, I haven’t legs but I can go.
My Penguin Math Book By:
Past Tense and Past Continuous Verbs
Problem-Solving and Control Structures By Faith Brenner
My Penguin Math Book By:
UNIT 9 A1+ MY ROUTINES Part I.
Morning Activities ESL Lesson Beginning Level
Blinkers ++ Team 5.
My daily routine What I usually do every morning
My Penguin Math Book By:
My Penguin Math Book By:
Routine Simple Present
My Penguin Math Book By:
This means in front of. The boy Stands before the class
Year 2 Summer Term Week 13 Lesson 4
Year 2 Summer Term Week 13 Lesson 4
Glazing Not painting!.
A Day in the life Of Mrs. Clayton.
Från verkligt problem till Datorprogram?
College English 2A Spring 2015 Unit 1 Part 2.
Presentation transcript:

From real problem to Computer program? You now what You want to do, but how to make it with a C-program?

Morning routine Structure diagram ”Morningwhile has gold in mouthd” Get dressed Eat breakfastGo to school Time Division By 2IT Data students …

Sequence (order in time) Get dressed Eat breakfastGo to school Morning routine 8:00 am8:02 am8:05 am Time Sequence Sequence parts

Structure diagram ”Morningwhile has gold in mouthd” Find clothesPut clothes on Morning routine Get dressedEat breakfastGo to school Division Time Take from wash basket Ask girlfriend where clothes are

Selection BluePinkWhite What colour on your socks? If blue exists If blue doesn’t exist, but pink does Else Selection Selection parts

Structure diagram ”Morningwhile has gold in mouthd” Many glasses of beer One glass of beer Division Time Morning routine Take from wash basket Ask girlfriend where clothes are Find clothesPut clothes on Get dressedEat breakfastGo to school

Iteration (repetition) Many glasses of beer One beer Drink beer (lightbeer) As long as you’re thirsty Iteration Iteration part

Structure diagram ”Morningwhile has gold in mouthd” Division Time Take a cabRun One step Morning routine Take from wash basket Ask girlfriend where clothes are Find clothesPut clothes on Get dressedEat breakfastGo to school Many glasses of beer One glass of beer

Flow chart Move foot one step Run Go to school Eat one pancake Eat breakfast Put on the clothes Ask girl/boyfriend Get from laundry basket Search clothes Get dressed Morning route IF you find basket WHILE pancakes <> 0 Take a cab IF money = 0 ELSE WHILE distance to school <> 0 Flowcharts are one dimensional. They are used when you have to describe exactly how the code is processed. The Structure diagram is easier to follow.

Crossing A B Imagine driving in car B, just behind another car A. You come to a crossing. How will you know which direction it will chose? Car A has to make a selection

Crossing a selection of directions How can you see in which direction the car in front of you will choose? Crossing Green signal STOPDRIVE Red signal Left blinkerRight blinkerNo blinker Drive leftStraight aheadDrive right Selection

Marriage - a selection? Marry girl Young man´s future choice not JSP

Selectionparts Young man´s future choice A selection must contain at least two selection components. If It only contains one there is no selection. Marry girl Be free!! Like this!

Al Bundy? Young man´s future choice We know the end…? Peg.. - make dinner! Marry girl It is however possible to leave a selection component empty.

Rules of Christmas Checks his slade Santa Claus X-mas day Gives one gift * While gifts not 0 not JSP

Santa changed his mind Parts connected to the same component must be of similar type Santa Claus X-mas day Checks his slade First Hands out gifts Last This is CORRECT!! Gives one gift While gifts not 0 *

Paint house - an iteration Paint House Get paint * While painter not satisfied with color Paint with Brush * While entire house not painted not JSP

Now you can begin to paint Get paintBegin to paint Paint House An iteration can only contain one repeated component Get one can of paint Paint with Brush * * While painter not satisfied with color While entire house not painted Iterations Iteration components OK !

JSP-editor Henrik Engström JSP-editor

Generate C

Web-Quiz

Web-Quiz

Good luck with your exercises!