Submit Search
Upload
การออกแบบและพัฒนาโปรแกรม Week4
•
Download as PPTX, PDF
•
1 like
•
969 views
ครูอาร์ม ฉึก ฉึก
Follow
การออกแบบและพัฒนาโปรแกรม Week4
Read less
Read more
Education
Report
Share
Report
Share
1 of 46
Download now
Recommended
การออกแบบและพัฒนาโปรแกรม
การออกแบบและพัฒนาโปรแกรม
ครูอาร์ม ฉึก ฉึก
รู้ให้เท่า ก้าวให้ทัน เทคโนโลยีการสื่อสาร
รู้ให้เท่า ก้าวให้ทัน เทคโนโลยีการสื่อสาร
ครูอาร์ม ฉึก ฉึก
Implementing
Implementing
Bau Toom
พื้นฐานการเขียนโปรแกรม
พื้นฐานการเขียนโปรแกรม
abhichatdotcom
การเขียนโปรแกรมภาษาซี
การเขียนโปรแกรมภาษาซี
choco336
อัลกอริทึมและการวิเคราะห์ปัญหา
อัลกอริทึมและการวิเคราะห์ปัญหา
supatra178
การบริหารโครงการ
การบริหารโครงการ
Nuch Sake
Project management
Project management
Satish Yadavalli
Recommended
การออกแบบและพัฒนาโปรแกรม
การออกแบบและพัฒนาโปรแกรม
ครูอาร์ม ฉึก ฉึก
รู้ให้เท่า ก้าวให้ทัน เทคโนโลยีการสื่อสาร
รู้ให้เท่า ก้าวให้ทัน เทคโนโลยีการสื่อสาร
ครูอาร์ม ฉึก ฉึก
Implementing
Implementing
Bau Toom
พื้นฐานการเขียนโปรแกรม
พื้นฐานการเขียนโปรแกรม
abhichatdotcom
การเขียนโปรแกรมภาษาซี
การเขียนโปรแกรมภาษาซี
choco336
อัลกอริทึมและการวิเคราะห์ปัญหา
อัลกอริทึมและการวิเคราะห์ปัญหา
supatra178
การบริหารโครงการ
การบริหารโครงการ
Nuch Sake
Project management
Project management
Satish Yadavalli
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
More Related Content
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
การออกแบบและพัฒนาโปรแกรม Week4
1.
การออกแบบและพัฒนาโปรแกรม ธนสาร รุจิรา kruarm@bicec.ac.th
2.
Week 4 Concept of
Programing
3.
ทบทวนความหลัง Week 3
4.
5.
6.
7.
8.
9.
รูปแบบการเขียนโปรแกรม 1. ตามลาดับ (Sequence) เป็นส่วนงานที่ต้องทาตามลาดับ
ก่อน-หลัง Command A Command B Command C END
10.
ตัวอย่าง ตามลาดับ (Sequence)
11.
รูปแบบการเขียนโปรแกรม 2. เลือกทา(Selection) การเลือกทาแบบเลือกทาทางเดียว เรียกว่า if-then Command
A เงื่อนไข จริง เท็จ
12.
ตัวอย่าง เลือกทา(Selection) การเลือกทาแบบเลือกทาทางเดียว เรียกว่า if-then
13.
รูปแบบการเขียนโปรแกรม 2. เลือกทา(Selection) การเลือกทาแบบเลือกทาสองทาง เรียกว่า if-then-else Command
A เงื่อนไข จริง เท็จ Command A
14.
ตัวอย่าง เลือกทา(Selection) การเลือกทาแบบเลือกทาสองทาง เรียกว่า if-then-else
15.
เลือกแบบซับซ้อน
16.
รูปแบบการเขียนโปรแกรม 2. เลือกทา(Selection) การเลือกทาแบบเลือกทามากกว่าสองทาง เรียกว่า
case Command A Command D Condition Command B Command C
17.
รูปแบบการเขียนโปรแกรม 3. การทาซา (LOOPING) การทางานซาแบบตรวจสอบเงื่อนไขก่อนทา เรียกว่า
Do-While (ทาในขณะที่ เช่น X<=10) Command B Condition จริง เท็จ Command A
18.
ตัวอย่าง การทาซา (LOOPING) การทางานซาแบบตรวจสอบ เงื่อนไขก่อนทา เรียกว่า Do-While
19.
รูปแบบการเขียนโปรแกรม 3. การทาซา (LOOPING) การทางานซาแบบตรวจสอบเงื่อนไขหลังทา เรียกว่า
Repeat-Until (ทาในขณะที่ เช่น X=10) Command B Condition จริง เท็จ Command A
20.
ตัวอย่าง การทาซา (LOOPING) การทางานซาแบบตรวจสอบ เงื่อนไขหลังทา เรียกว่า Repeat-Until
21.
ขันตอนการเขียนโปรแกรม 1. กาหนดและวิเคราะห์ปัญหา 2. เขียนผังงานและซูโดโค้ด 3.
เขียนโปรแกรม 4. ทดสอบและแก้ไขโปรแกรม 5. ทาเอกสารและบารุงรักษาโปรแกรม
22.
ตัวอย่าง 1 จงเขียนโปรแกรมรับค่าเลขจานวนเต็ม 2 จานวนและหาผลบวกของเลขทัง
2 จานวนนัน
23.
1 กาหนดและวิเคราะห์ปัญหา 1. ปัญหา
คือ รับค่าเลขจานวนเต็ม 2 จานวนและหาผลบวก ผลรวม 2. ตัวแปรที่ใช้ คือ X ใช้เก็บเลขจานวนเต็มตัวที่ 1 Y ใช้เก็บเลขจานวนเต็มตัวที่ 2 SUM ใช้เก็บผลรวม = เลขจานวนเต็มตัวที่ 1 + เลขจานวนเต็มตัวที่ 2
24.
1 กาหนดและวิเคราะห์ปัญหา 3. ข้อมูลนาเข้า
คือ ค่าของ X และ Y 4. ผลลัพธ์ คือ คานวณหาผลบวก จากสูตร SUM = X + Y
25.
1 กาหนดและวิเคราะห์ปัญหา ขันตอนการทางาน 1. รับค่า
X และ Y เข้ามาในโปรแกรม 2. คานวณหาผลบวก จากสูตร SUM = X + Y
26.
2 เขียนผังงานและซูโดโค้ด ซูโดโค้ด (Pseudocode) START READ
X READ Y COMPUTE SUM=x + Y PRINT SUM STOP เขียนลาดับการทางานของ โปรแกรม โดยใช้ประโยค ภ า ษ า อั ง ก ฤ ษ ที่ สื่ อ ความหมายง่าย ๆ
27.
2 เขียนผังงานและซูโดโค้ด ผังงาน (Flowchart) เขียนลาดับการทางานของ การเขียนโปรแกรม
โดย แทนด้วยสัญลักษณ์เป็นตัว สื่อความหมาย START INPUT X,Y SUM=X+Y PRINT SUM STOP
28.
ตัวอย่าง 2 จงเขียนโฟลวชาร์ตแสดงขันตอน การหาพืนที่ของรูปสี่เหลี่ยมคางหมู
29.
1. ปัญหา คือ
ต้องการคานวณหาพืนที่ของรูปสี่เหลี่ยมคางหมู จากสูตร พืนที่สี่เหลี่ยมคางหมู = 1/2 x ผลบวกของด้านคู่ขนาน x สูง 2. ตัวแปรที่ใช้ คือ w1 ใช้เก็บความยาวของด้านคู่ขนานด้านที่ 1 w2 ใช้เก็บความยาวของด้านคู่ขนานด้านที่ 2 h ใช้เก็บความสูงของรูปสี่เหลี่ยมคางหมู Area ใช้เก็บพืนที่ของรูปสี่เหลี่ยมคางหมู ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 1 กาหนดและวิเคราะห์ปัญหา
30.
ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 3. ข้อมูลนาเข้า
คือ ค่าของ W1,W2 และh 4. ผลลัพธ์ คือ คานวณพืนที่ของรูปสี่เหลี่ยมคางหมู จากสูตร Area= 1/2 x (w1+w2) x h 1 กาหนดและวิเคราะห์ปัญหา
31.
ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 2 เขียนผังงานและซูโดโค้ด START INPUT
w1,w2,h Area = 1/2 x (w1+w2) x h STOP
32.
START INPUT w1,w2,h Area =1/2
x(w1+w2)x h STOP Area INPUT w1,w2,h START Area =1/2 x(w1+w2)x h STOP Area
33.
ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 3 เขียนโปรแกรม
#include <stdio.h> viod main(viod) { int x,y,sum; printf(“Value of x is : ”); scanf(“%d”,&x); printf(“Value of y is : ”); scanf(“%d”,&y); sum=x+y; printf(“Sum of %d+%d is %dn”,x,y,sum); }
34.
ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 3 เขียนโปรแกรม
#include <stdio.h> viod main(viod) { int x,y,sum; printf(“Value of x is : ”); scanf(“%d”,&x); printf(“Value of y is : ”); scanf(“%d”,&y); sum=x+y; printf(“Sum of %d+%d is %dn”,x,y,sum); } INPUT X INPUTY SUM X+Y PRINT SUM
35.
ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 4 ทดสอบและแก้ไขโปรแกรม เป็นการนาผลลัพธ์จากขันตอนที่
3 มาทาการ Run แล้วทดสอบโดยการป้อนค่า x และ y เข้าไปในโปรแกรม และตรวจสอบผลลัพธ์ที่ได้ว่าถูกต้องหรือไม่ หากไม่ ถูกต้องก็กลับไปทาการแก้ไขโปรแกรมอีกครัง
36.
ตัวอย่างที่ 1 จงเขียนโฟลวชาร์ตแสดงขันตอนการหาพืนที่ของรูปสี่เหลี่ยมคางหมู 5 ทาเอกสารและบารุงรักษาโปรแกรม จุดประสงค์ที่สาคัญของการจัดทาคู่มือเพื่อช่วยให้ผู้อื่น ศึกษาซอร์สโค้ดของโปรแกรมได้ง่ายขึน
จะเป็นประโยชน์ สาหรับการพัฒนาเพิ่มเติมในอนาคต สิ่งที่สาคัญสาหรับการ จัดทาคู่มือ คือ “คู่มือมีรายละเอียดมากที่สุด”
37.
แบบฝึกหัด การเขียนผังงาน
38.
START นำเข้ำคะแนน เกรด 1 STOP คะแนน <
50 เกรด 0 จริงเท็จ
39.
40.
41.
42.
43.
44.
45.
46.
Homework
Download now