Boqonnaa 6 Teeknooloojii Odeeffannoo kutaa 9
Top-down or bottom-up: building a program from modules
daqiiqaa 4 · Gaaffii qormaata darbe 2 hojjetaman
Kutaalee barnootaa
Barnoota achii jalqabee taphachiisuuf kutaa tokko tuqi.
Barnoota viidiyoo Temari daqiiqaa 4 boqonnaa 6 Teeknooloojii Odeeffannoo kutaa 9: Top-down or bottom-up: building a program from modules. Barnoonni kun Afaan Ingiliziitiin.
Dabalata boqonnaa 6
Fuulli boqonnaa kanaa wanta Temari boqonnaa kana irratti qabu kan hafe qaba, fakkeenyaaf yaadannoo gabaabaa fi gaaffii shaakalaa deebii isaanii waliin.
Fuula boqonnaa 6 baniWanta barnoonni jedhu hunda
Jechoota barnootaa kutaa kutaan. Barnoota achii jalqabee taphachiisuuf yeroo tuqi.
0:00Introduction
A big program is hard to write in one go. So programmers split the work into pieces called modules. There are two ways to do it: from the top down, or from the bottom up. Learn which way each one goes, and you can tell them apart in any question.
0:17Top-down: start with the whole
Start with top-down. It begins with the whole, big problem. A big problem is hard to manage all at once. So you divide it into smaller sub-problems that you can manage. This dividing is called modularization.
The solution to each small problem is called a module. You solve the modules one by one. Then you join them together, and you have the complete solution to the big problem.
0:44Top-down in action
Your book uses an example. A program must work out the wages of ten labourers. Top-down, you split it into two modules. The first, CalculateWage, works out the net pay for one labourer.
The second is the main module. It calls CalculateWage inside a loop, so the wage is worked out ten times. In a flowchart, a module like this is drawn with the subroutine symbol.
1:10Practice question 1Qormaata darbe
Here is a practice question. What is the process of breaking down a large, complex problem into smaller, manageable sub-problems called in the top-down approach? Pause the video, and try it.
Breaking a big problem into smaller ones is the very first move of top-down, and your book names it modularization. The answer is C. Unit testing is testing each piece before you go on. Optimization is a type of problem that looks for the best answer, like the fastest route. And desk checking is not the name for dividing a problem.
1:52Bottom-up: start with the pieces
Bottom-up works the opposite way. You start with the smallest units, the modules, and solve each one on its own. Then you join them together, piece by piece, into the bigger program.
Your book's example: a program for the area and perimeter of different shapes, like a circle, a triangle and a rectangle. If modules for each shape already exist, you bring them together. If not, you build each module first, then build them up into one program.
Most real programs use a mix of both. And both build the program piece by piece, testing each piece before moving on. That is called unit testing.
2:35Practice question 2Qormaata darbe
Try this one. A programmer develops separate individual modules to calculate the area of different shapes and then combines them into one large application. Which problem-solving approach is being used? Pause, and try it.
The programmer built the small modules first, then combined them into the big application. Pieces first, whole last: that is bottom-up. The answer is B. Top-down goes the other way: it starts with the big problem and divides it. Desk checking is not a way of building a program. And a non-computational activity is done by people, not by a computer program.
3:23Summary
So remember. Top-down starts with the big problem and divides it into modules. That dividing is modularization. Bottom-up starts with the modules and joins them into the big program. And most programs use both, testing each piece as they go. Keep practising questions like these on Temari.et.
Boqonnaa kana appii keessatti shaakali
Temari boqonnaa kana gara shaakala yeroon daangeffametti jijjiira; utuu hojjettuu ni sirreessa; wanti si hin galinis barsiisaa AI tiin ni ibsama.
Bilisaan jalqabiTemari.et appii Android qaba; Google Play irratti bilisaan argama.

