Chapterبەش 1 · Lectureوانە 1.3

Requirements and Design: Deciding What to Buildپێداویستییەکان و دیزاین: بڕیاردان لەسەر ئەوەی چی دروست بکەین

How a team finds out what to build and plans how: asking why until the real need appears, stakeholders, gathering requirements, functional and non-functional requirements, testable requirements, user stories with INVEST and Given–When–Then acceptance criteria, use cases, MoSCoW and the product backlog, architecture and detailed design, a UML class diagram, modularity, coupling and cohesion, and a requirement turned into runnable checks with traceability — all on Bazaar Cart, an order app for a Sulaimani spice shop.

تیمێک چۆن دەدۆزێتەوە چی دروست بکات و چۆن پلانی بۆ دادەنێت: پرسینی بۆچی تا پێویستییە ڕاستەقینەکە دەردەکەوێت، ، کۆکردنەوەی ، و ، تاقیکراوە، لەگەڵ INVEST و ⁦Given–When–Then⁩، ، و ، و دیزاینی ورد، ، ، و و کە دەکرێت بە پشکنینی جێبەجێکراو لەگەڵ — هەمووی لەسەر Bazaar Cart، داواکاری بۆ دوکانێکی بەهارات لە سلێمانی.

18 min read20 خولەک خوێندنەوە · 17 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Find the real need behind a request by asking why, and list a project's stakeholders.
  • Tell functional from non-functional requirements and rewrite vague requirements so they can be tested.
  • Write user stories with Given–When–Then acceptance criteria and order a backlog with MoSCoW.
  • Explain architecture vs detailed design, read a simple UML class diagram, and judge coupling and cohesion.
  • Turn a testable requirement into runnable checks and trace it from rule to code.
  • بە پرسینی بۆچی پێویستییە ڕاستەقینەکەی پشت داواکارییەک بدۆزیتەوە و پڕۆژەیەک لیست بکەیت.
  • لە جیا بکەیتەوە و ناڕوون دووپاتە بنووسیتەوە بۆ ئەوەی تاقی بکرێنەوە.
  • لەگەڵ ⁦Given–When–Then⁩ بنووسیت و بە ڕیز بکەیت.
  • جیاوازیی و دیزاینی ورد ڕوون بکەیتەوە، سادە بخوێنیتەوە و و هەڵبسەنگێنیت.
  • تاقیکراوە بکەیت بە پشکنینی جێبەجێکراو و لە یاساوە تا کۆد بەدوای دابچیت.

What does Soran really need?سۆران بە ڕاستی چی پێویستە؟

Soran sells dried fruit, spices, black tea and honey in the Sulaimani bazaar (meet Bazaar Cart and the team). One day he tells Aram's team: “I want an app.” That sentence is not a requirement yet. A requirement is something the software must do, or must be, so that it solves a real problem. So Aram first asks why — and asks again after every answer.

سۆران لە بازاڕی سلێمانی میوەی وشک، بەهارات، چای ڕەش و هەنگوین دەفرۆشێت (Bazaar Cart و تیمەکە بناسە). ڕۆژێک بە تیمەکەی ئارام دەڵێت: « دەوێت». ئەم ڕستەیە هێشتا نییە. ئەو شتەیە کە دەبێت بیکات، یان دەبێت وا بێت، بۆ ئەوەی کێشەیەکی ڕاستەقینە چارەسەر بکات. بۆیە ئارام سەرەتا دەپرسێت بۆچی و دوای هەر وەڵامێک دیسان دەپرسێتەوە.

Why an app? Because phone orders get lost. Why do they get lost? Because on busy Thursday evenings the assistant writes them in a notebook while the phone keeps ringing, and some totals are wrong. Engineers call this the five whys: stop when the answer is “if we do not solve this, Soran's problem is not solved”. Two or three whys are often enough. Now the goal is clear: orders that cannot get lost, and totals that are always right.

بۆچی ؟ چونکە داواکارییە تەلەفۆنییەکان ون دەبن. بۆچی ون دەبن؟ چونکە لە ئێوارە قەرەباڵغەکانی پێنجشەممەدا یاریدەدەرەکە لە کاتێکدا تەلەفۆن بەردەوام زەنگ لێدەدات، داواکارییەکان لە دەفتەرێکدا دەنووسێت و هەندێک کۆی گشتی هەڵەن. ئەندازیاران ئەمە ناو دەنێن پێنج بۆچی: کاتێک بوەستە کە وەڵامەکە ئەوە بێت «ئەگەر ئەمە چارەسەر نەکەین، کێشەکەی سۆران چارەسەر نابێت». زۆرجار دوو یان سێ بۆچی بەسە. ئێستا ئامانجەکە ڕوونە: داواکارییەک کە ون نەبێت و کۆی گشتییەک کە هەمیشە دروست بێت.

Three steps going down. Soran: I want an app. Why? Phone orders get lost. Why? On busy Thursday evenings they are written in a notebook while the phone rings, and some totals are wrong. At the bottom, the real need: orders that cannot get lost and totals that are always right.سێ پلە بەرەو خوارەوە. سۆران: ئەپێکم دەوێت. بۆچی؟ داواکارییە تەلەفۆنییەکان ون دەبن. بۆچی؟ لە ئێوارە قەرەباڵغەکانی پێنجشەممەدا لە دەفتەرێکدا دەنووسرێن لە کاتێکدا تەلەفۆن زەنگ لێدەدات و هەندێک کۆی گشتی هەڵەن. لە خوارەوە پێویستییە ڕاستەقینەکە: داواکارییەک کە ون نەبێت و کۆی گشتییەک کە هەمیشە دروست بێت.
Ask “why?” until you reach the real problem.«بۆچی؟» بپرسە تا دەگەیتە کێشە ڕاستەقینەکە.CêIT

Stakeholders: whom to askلایەنە پەیوەندیدارەکان: لە کێ بپرسین

A stakeholder is any person, group or organisation that takes part in the project, is affected by its result, or can change its result. Each one needs different things, so the team lists them before it asks any questions. For Bazaar Cart:

هەر کەس، گرووپ یان دامەزراوەیەکە کە بەشداری پڕۆژەکە دەکات، ئەنجامەکەی کاری تێدەکات، یان دەتوانێت ئەنجامەکەی بگۆڕێت. هەر یەکێکیان پێویستیی جیاوازی هەیە، بۆیە تیمەکە پێش هەر پرسیارێک لیستیان دەکات. بۆ Bazaar Cart:

  • Soran, the owner: he pays for the app and decides what it must do.
  • Customers: young people who order fast, and older customers who read only Kurdish.
  • The delivery driver: he needs the address and the amount to collect.
  • The assistant who takes phone orders today: the app changes his work.
  • The team (Aram, Shilan, Karwan, Dilan), who build it and keep it working.
  • The rules: customers' phone numbers and addresses must stay private.
  • سۆران، خاوەنی دوکانەکە: پارەی دەدات و بڕیار دەدات دەبێت چی بکات.
  • کڕیاران: گەنجان کە خێرا داوا دەکەن و کڕیارە بەتەمەنەکان کە تەنیا کوردی دەخوێننەوە.
  • شۆفێری گەیاندن: ناونیشان و ئەو بڕە پارەیەی پێویستە کە وەری بگرێت.
  • یاریدەدەرەکە کە ئەمڕۆ داواکاریی تەلەفۆنی وەردەگرێت: کارەکەی دەگۆڕێت.
  • تیمەکە (ئارام، شیلان، کاروان، دیلان)، کە دروستی دەکەن و بە کارکردوویی دەیهێڵنەوە.
  • یاساکان: کڕیاران دەبێت بپارێزرێت، واتە ژمارەی تەلەفۆن و ناونیشانەکانیان.
A map with Bazaar Cart in the centre. Inner ring, people who use it every day: customers, Soran, the delivery driver. Middle ring: the assistant whose phone work changes, and the team of four. Outer ring: privacy rules for phone numbers and addresses.نەخشەیەک کە Bazaar Cart لە ناوەڕاستیدایە. بازنەی ناوەوە، ئەوانەی هەموو ڕۆژێک بەکاری دەهێنن: کڕیاران، سۆران، شۆفێری گەیاندن. بازنەی ناوەڕاست: یاریدەدەرەکە کە کاری تەلەفۆنەکەی دەگۆڕێت و تیمە چوار کەسییەکە. بازنەی دەرەوە: یاساکانی تایبەتێتی بۆ ژمارەی تەلەفۆن و ناونیشان.
Bazaar Cart's stakeholders, from daily users outwards. Bazaar Cart، لە بەکارهێنەرانی ڕۆژانەوە بەرەو دەرەوە.CêIT

Gathering requirementsکۆکردنەوەی پێداویستییەکان

Requirements rarely arrive ready. People forget to mention what seems obvious to them, so the team digs in several ways:

بە دەگمەن ئامادە دێن. خەڵک ئەوەی بە لای خۆیانەوە ڕوونە لەبیریان دەچێت بیڵێن، بۆیە تیمەکە بە چەند ڕێگایەک هەڵیدەکۆڵێت:

  • Interviews: Aram asks Soran and three regular customers open questions (“How do you take an order today?”). The English for such talks is practised in Collecting requirements.
  • Watching the work: Dilan spends a busy Thursday evening in the shop and sees what really happens.
  • Questionnaires: five short questions for 30 customers — which phone, which language, what time they order.
  • Old records: the order notebook shows what sells and how orders are written.
  • Prototypes and personas: paper screens that customers try, and one typical customer with a name — see Finding out who your users are.
  • چاوپێکەوتن: ئارام پرسیاری کراوە لە سۆران و سێ کڕیاری بەردەوام دەکات («ئەمڕۆ چۆن داواکارییەک وەردەگریت؟»). ئینگلیزیی ئەم گفتوگۆیانە لە کۆکردنەوەی پێداویستییەکان ڕاهێنانی لەسەر کراوە.
  • سەیرکردنی کارەکە: دیلان ئێوارەیەکی قەرەباڵغی پێنجشەممە لە دوکانەکە بەسەر دەبات و دەبینێت بە ڕاستی چی ڕوو دەدات.
  • فۆرمی پرسیار: پێنج پرسیاری کورت بۆ ⁦30⁩ کڕیار — کام مۆبایل، کام زمان، لە چ کاتێکدا داوا دەکەن.
  • تۆمارە کۆنەکان: دەفتەری داواکارییەکان پیشان دەدات چی دەفرۆشرێت و داواکارییەکان چۆن دەنووسرێن.
  • و : شاشەی کاغەزی کە کڕیاران تاقیی دەکەنەوە و کڕیارێکی ئاسایی بە ناوێکەوە — بڕوانە دۆزینەوەی ئەوەی بەکارهێنەرەکانت کێن.

Then the team writes down what it heard and reads it back to Soran. The picture shows why.

دواتر تیمەکە ئەوەی بیستوویەتی دەینووسێت و بۆ سۆرانی دەخوێنێتەوە. وێنەکە پیشان دەدات بۆچی.

Three speech bubbles in a row, like a children's whisper game. Soran says: customers order on their phones and pay the driver in cash. Aram's note says: order and pay in the app. Karwan builds a card-payment screen. Soran at the end: but my customers pay cash!سێ بڵقی قسە بە ڕیز، وەک یارییەکی چپەی منداڵان. سۆران دەڵێت: کڕیاران بە مۆبایلەکانیان داوا دەکەن و پارە بە نەختینە دەدەنە شۆفێرەکە. تێبینییەکەی ئارام دەڵێت: داواکردن و پارەدان لە ناو ئەپەکەدا. کاروان شاشەیەکی پارەدان بە کارت دروست دەکات. سۆران لە کۆتاییدا: بەڵام کڕیارەکانم بە نەختینە پارە دەدەن!
Every retelling changes the meaning a little. Write it down and check it with the stakeholder.هەر گێڕانەوەیەک واتاکە کەمێک دەگۆڕێت. بینووسە و لەگەڵ پشتڕاستی بکەرەوە.CêIT

Functional and non-functional requirementsپێداویستییە فەنکشنییەکان و پێداویستییە نافەنکشنییەکان

Requirements come in two kinds. A functional requirement describes behaviour that people can see: what the software does — the rules it enforces and the steps it carries out. A non-functional requirement limits how it is built or how well it must work: which phones, which languages, how fast, how safe.

دوو جۆرن. ڕەفتارێک وەسف دەکات کە خەڵک دەیبینن: ئەوەی دەیکات — ئەو یاسایانەی جێبەجێیان دەکات و ئەو هەنگاوانەی ئەنجامیان دەدات. سنوور بۆ ئەوە دادەنێت کە چۆن دروست دەکرێت یان دەبێت چەند باش کار بکات: کام مۆبایل، کام زمان، چەند خێرا، چەند پارێزراو.

A test from SWEBOK, the IEEE guide to the field: imagine a perfect computer — endlessly fast, endless memory, free and never broken. Would you still need to write the requirement down? Then it is functional. If it matters only because real computers and networks are slow, limited or attacked, it is non-functional.

تاقیکردنەوەیەک لە SWEBOK، ڕێبەری IEEE بۆ ئەم بوارە: کۆمپیوتەرێکی تەواو بهێنە بەرچاوت — بێسنوور خێرا، بیرگەی بێسنوور، بێبەرانبەر و هەرگیز تێکناچێت. ئایا هێشتا پێویستە بنووسیت؟ کەواتە فەنکشنییە. ئەگەر تەنیا لەبەر ئەوە گرنگە کە کۆمپیوتەر و تۆڕە ڕاستەقینەکان خاو، سنووردار یان لەژێر هێرشدان، ئەوا نافەنکشنییە.

The perfect-computer question at the top, and two baskets. Functional, what Bazaar Cart does: shows each line price rounded up to 250 IQD; refuses lines under 100 g or over 10,000 g; never sells more than the stock; adds 3,000 IQD delivery, free from 50,000 IQD. Non-functional, how well and with what: works on Android 8 and newer; Kurdish and Arabic text, right to left; the total appears within 2 seconds on 4G; only Soran can see customers' phone numbers.پرسیاری کۆمپیوتەری تەواو لە سەرەوە و دوو سەبەتە. فەنکشنی، ئەوەی Bazaar Cart دەیکات: نرخی هەر دێڕێک پیشان دەدات کە بۆ 250 دینار بەرز کراوەتەوە؛ دێڕی کەمتر لە 100 گرام یان زیاتر لە 10,000 گرام ڕەت دەکاتەوە؛ هەرگیز لە کۆگا زیاتر نافرۆشێت؛ 3,000 دینار گەیاندن زیاد دەکات و لە 50,000 دینارەوە بێبەرانبەرە. نافەنکشنی، چەند باش و لەگەڵ چی: لەسەر Android 8 و نوێتر کار دەکات؛ دەقی کوردی و عەرەبی لە ڕاستەوە بۆ چەپ؛ کۆی گشتی لە ماوەی 2 چرکەدا لەسەر 4G دەردەکەوێت؛ تەنیا سۆران ژمارەی تەلەفۆنی کڕیاران دەبینێت.
Bazaar Cart's first requirements in two baskets. Prices are made up, in IQD.یەکەم Bazaar Cart لە دوو سەبەتەدا. نرخەکان دروستکراون، بە دینار.CêIT

Good requirements can be testedپێداویستییەکانی باش تاقی دەکرێنەوە

A good requirement is clear (it can be read only one way), holds one idea, is testable (a tester can say pass or fail), and states the stakeholder's real need, not a solution. Words like fast, easy and modern cannot be tested until they get a number.

باش ڕوونە (تەنیا بە یەک شێوە دەخوێندرێتەوە)، یەک بیرۆکەی تێدایە، تاقی دەکرێتەوە ( دەتوانێت بڵێت دەرچوو یان دەرنەچوو) و پێویستیی ڕاستەقینەی دەڵێت، نەک چارەسەرێک. وشەی وەک خێرا، ئاسان و نوێ تاقی ناکرێنەوە تا ژمارەیەکیان بۆ زیاد نەکرێت.

VagueناڕوونBetterباشتر
“The app must be fast.”« دەبێت خێرا بێت.»On 4G, the total appears within 2 seconds after a line changes.لەسەر ⁦4G⁩، کۆی گشتی لە ماوەی 2 چرکەدا دوای گۆڕانی دێڕێک دەردەکەوێت.
“Delivery should be cheap.”«گەیاندن دەبێت هەرزان بێت.»Delivery inside Sulaimani costs 3,000 IQD and is free from a 50,000 IQD goods total (R4).گەیاندن لە ناو سلێمانی ⁦3,000⁩ دینارە و لە کۆی ⁦50,000⁩ دیناری کاڵاوە بێبەرانبەرە ⁦(R4)⁩.
“The app must be easy to use.”« دەبێت ئاسان بێت.»A first-time customer places an order in under 3 minutes without help.کڕیارێکی نوێ لە کەمتر لە 3 خولەکدا بێ یارمەتی داواکارییەک دەنێرێت.
“Handle orders, payments, SMS and receipts.”«داواکاری، پارەدان، و پسوولە بەڕێوە ببات.»Four requirements, one idea each.چوار ، هەر یەکەیان یەک بیرۆکە.
“Use a MySQL table for orders.”«خشتەیەکی MySQL بۆ داواکارییەکان بەکار بهێنە.»Orders are still there after the phone or the server restarts. (Ask why — the table was a solution.)داواکارییەکان دوای دووپاتە هەڵکردنەوەی مۆبایل یان هێشتا هەن. (بپرسە بۆچی — خشتەکە چارەسەرێک بوو.)
Dilan, the tester, holds two vague and measurable requirements. For “The app must be fast” she can only answer with a question mark: fast for whom, on which phone? For “On 4G the total appears within 2 seconds” she uses a stopwatch and can stamp PASS or FAIL.دیلان، تاقیکەرەوەی نەرمەواڵەکە، دوو پێداویستیی ناڕوون و پێوانەکراو بەدەستەوەیە. بۆ «ئەپەکە دەبێت خێرا بێت» تەنیا دەتوانێت بە نیشانەی پرسیار وەڵام بداتەوە: خێرا بۆ کێ، لەسەر کام مۆبایل؟ بۆ «لەسەر 4G کۆی گشتی لە ماوەی 2 چرکەدا دەردەکەوێت» کاتژمێرێکی وەستان بەکار دەهێنێت و دەتوانێت مۆری دەرچوو یان دەرنەچوو لێبدات.
If a tester cannot say pass or fail, the requirement is not finished.ئەگەر نەتوانێت بڵێت دەرچوو یان دەرنەچوو، تەواو نەبووە.CêIT

User storiesچیرۆکەکانی بەکارهێنەر

Agile teams often write requirements as user stories: one sentence from the user's point of view, in the form As a ⟨role⟩, I want ⟨something⟩, so that ⟨benefit⟩. For example: As a customer, I want to see the delivery fee before I order, so that I know the full price.

تیمە زۆرجار وەک دەنووسن: یەک ڕستە لە ڕوانگەی ، بەم شێوەیە: وەک ⟨ڕۆڵ⟩، دەمەوێت ⟨شتێک⟩، بۆ ئەوەی ⟨سوود⟩. بۆ نموونە: وەک کڕیارێک، دەمەوێت پێش داواکردن کرێی گەیاندن ببینم، بۆ ئەوەی نرخی تەواو بزانم.

A story is not a full document. Ron Jeffries (2001) described three C's: a card that names it, a conversation in which the team and the customer fill in the details, and a confirmation — the tests that show it is done. Bill Wake's checklist INVEST (2003) says a good story is Independent, Negotiable, Valuable, Estimable, Small enough for one sprint, and Testable.

بەڵگەنامەیەکی تەواو نییە. ڕۆن جێفریز ⁦(2001)⁩ سێ C وەسف کرد: کارتێک ⁦(card)⁩ کە ناوی دەنێت، گفتوگۆیەک ⁦(conversation)⁩ کە تیمەکە و کڕیارەکە وردەکارییەکانی تێدا پڕ دەکەنەوە و پشتڕاستکردنەوەیەک ⁦(confirmation)⁩ — ئەو تاقیکردنەوانەی پیشان دەدەن تەواو بووە. لیستی پشکنینی INVESTـی بیل وەیک ⁦(2003)⁩ دەڵێت باش سەربەخۆیە ⁦(I)⁩، دەکرێت گفتوگۆی لەسەر بکرێت ⁦(N)⁩، بەهای هەیە ⁦(V)⁩، دەکرێت ماوەکەی خەمڵێنرێت ⁦(E)⁩، ئەوەندە بچووکە کە لە یەک جێی ببێتەوە ⁦(S)⁩ و تاقی دەکرێتەوە ⁦(T)⁩.

The front of an index card. Label BC-7, priority Must, estimate 1 day. The story: As a customer, I want to see the delivery fee before I order, so that I know the full price. Arrows name the three parts: role, want, benefit.ڕووی پێشەوەی کارتێکی بچووک. ناونیشانی BC-7، پێشینەیی Must، خەمڵاندنی 1 ڕۆژ. چیرۆکەکە: وەک کڕیارێک، دەمەوێت پێش داواکردن کرێی گەیاندن ببینم، بۆ ئەوەی نرخی تەواو بزانم. تیرەکان ناوی سێ بەشەکە دەنێن: ڕۆڵ، ویست، سوود.
A user story card: who, what and why.کارتی : کێ، چی و بۆچی.CêIT

User storiesچیرۆکەکانی بەکارهێنەر

Acceptance criteria: Given, When, Thenپێوەرەکانی پەسەندکردن: Given، When، Then

The confirmation is written as acceptance criteria: the exact conditions under which Soran accepts the story. A popular form comes from behaviour-driven development (Dan North and Chris Matts): Given the situation before, When the user acts, Then the result that must follow. Each scenario is one example with real numbers.

پشتڕاستکردنەوەکە وەک دەنووسرێت: ئەو مەرجە وردانەی کە سۆران لەژێریاندا چیرۆکەکە پەسەند دەکات. شێوەیەکی باو لە گەشەپێدانی ڕەفتارتەوەرەوە هاتووە (دان نۆرث و کریس ماتس): Given (بەو پێیەی) بارودۆخی پێشوو، When (کاتێک) کارێک دەکات، Then (ئەوا) ئەو ئەنجامەی دەبێت دوای بکەوێت. هەر سیناریۆیەک یەک نموونەیە بە ژمارەی ڕاستەقینە.

The back of card BC-7 with two scenarios. Scenario 1: Given the goods total is 49,750 IQD and the address is in Sulaimani, when the customer opens the checkout, then the delivery fee is 3,000 IQD and the total to pay is 52,750 IQD. Scenario 2: Given the goods total is 50,000 IQD and the address is in Sulaimani, when the customer opens the checkout, then the delivery fee is 0 and “Free delivery” is shown. A note at the bottom: outside Sulaimani? R4 does not say — ask Soran.ڕووی پشتەوەی کارتی BC-7 بە دوو سیناریۆ. سیناریۆی 1: بەو پێیەی کۆی کاڵاکان 49,750 دینارە و ناونیشانەکە لە سلێمانییە، کاتێک کڕیار پەڕەی پارەدان دەکاتەوە، ئەوا کرێی گەیاندن 3,000 دینارە و کۆی پارەی دراو 52,750 دینارە. سیناریۆی 2: بەو پێیەی کۆی کاڵاکان 50,000 دینارە و ناونیشانەکە لە سلێمانییە، کاتێک کڕیار پەڕەی پارەدان دەکاتەوە، ئەوا کرێی گەیاندن سفرە و «گەیاندنی بێبەرانبەر» پیشان دەدرێت. تێبینییەک لە خوارەوە: دەرەوەی سلێمانی؟ R4 هیچی لەسەر نالێت — لە سۆران بپرسە.
Two scenarios turn rule R4 into examples anyone can check.دوو سیناریۆ یاسای ⁦R4⁩ دەکەن بە نموونە کە هەر کەسێک دەتوانێت بیپشکنێت.CêIT

Why 49,750? Line prices are rounded up to multiples of 250 IQD, so 49,750 is the largest goods total below the limit. Writing scenarios also shows gaps: what happens outside Sulaimani? R4 does not say, so Aram asks Soran before anyone writes code.

بۆچی ⁦49,750⁩؟ نرخی دێڕەکان بۆ چەندجارەکانی ⁦250⁩ دینار بەرز دەکرێنەوە، بۆیە ⁦49,750⁩ گەورەترین کۆی کاڵایە لە خوار سنوورەکەوە. نووسینی سیناریۆ کەلێنەکانیش پیشان دەدات: لە دەرەوەی سلێمانی چی دەبێت؟ ⁦R4⁩ هیچی لەسەر نالێت، بۆیە ئارام پێش ئەوەی کەس کۆد بنووسێت لە سۆران دەپرسێت.

User storiesچیرۆکەکانی بەکارهێنەر

Use case or user story?حاڵەتی بەکارهێنان یان چیرۆکی بەکارهێنەر؟

You will also meet use cases, for example in the database life cycle. A use case describes step by step how an actor reaches a goal with the system: the main path and what happens when something goes wrong. A user story is shorter: a promise of a conversation, small enough to plan.

دەبینیت، بۆ نموونە لە خولی ژیانی بنکەدراوە. هەنگاو بە هەنگاو وەسف دەکات کە ئەکتەرێک چۆن لە ڕێگەی سیستەمەکەوە دەگاتە ئامانجێک: ڕێگا سەرەکییەکە و ئەوەی کاتێک شتێک هەڵە دەچێت ڕوو دەدات. کورتترە: بەڵێنی گفتوگۆیەکە و ئەوەندە بچووکە کە پلانی بۆ دابنرێت.

Use caseUser story
SizeقەبارەA page of numbered stepsپەڕەیەک هەنگاوی ژمارەدارOne sentence + acceptance criteriaیەک ڕستە +
Holdsچی تێدایەMain path, other paths, errorsڕێگای سەرەکی، ڕێگاکانی تر، هەڵەکانRole, want, benefitڕۆڵ، ویست، سوود
Best forباشترە بۆUnderstanding a whole interactionتێگەیشتن لە کارلێکێکی تەواوPlanning small pieces of workپلاندانان بۆ پارچە کاری بچووک
Left: a use case form, Place an order, with main steps 1 to 5 and an other path 2a: a line under 100 g shows a message. Right: three story cards made from it: choose products and grams; see the delivery fee before ordering; confirm the order and get a number. An arrow says: split into stories.چەپ: فۆرمی حاڵەتی بەکارهێنانی «ناردنی داواکاری» بە هەنگاوە سەرەکییەکانی 1 تا 5 و ڕێگایەکی تری 2a: دێڕێکی کەمتر لە 100 گرام پەیامێک پیشان دەدات. ڕاست: سێ کارتی چیرۆک کە لێی دروست کراون: هەڵبژاردنی کاڵا و گرام؛ بینینی کرێی گەیاندن پێش داواکردن؛ پشتڕاستکردنەوەی داواکاری و وەرگرتنی ژمارەیەک. تیرێک دەڵێت: دابەشکردن بۆ چیرۆک.
One big use case can become several small stories. گەورە دەتوانێت ببێت بە چەند چیرۆکێکی بچووک.CêIT

MoSCoW and the product backlogڕێگەی MoSCoW و لیستی کاری بەرهەم

Everything the product might need goes into the product backlog, an ordered list that the product owner — Aram — keeps up to date (the Scrum artifacts). To order it, many teams use the MoSCoW method from DSDM: Must have, Should have, Could have, Won't have this time. The English words are practised in MoSCoW; this is how a team decides:

هەموو ئەو شتانەی بەرهەمەکە لەوانەیە پێویستی پێیان بێت دەچنە ناو ، لیستێکی ڕیزکراو کە — ئارام — نوێی دەکاتەوە (بەرهەمەکانی Scrum). بۆ ڕیزکردنی، زۆر تیم لە DSDMـەوە بەکار دەهێنن: Must have، Should have، Could have، ⁦Won't have this time⁩. وشە ئینگلیزییەکان لە MoSCoW ڕاهێنانیان لەسەر کراوە؛ تیمێک بەم شێوەیە بڕیار دەدات:

  • A Must is part of the minimum usable product. Ask: “What happens if it is missing?” If the release is pointless without it, it is a Must; if there is a workaround, it is not.
  • Musts take no more than about 60 % of the effort, and Coulds about 20 %. When time runs short, Coulds go first, so the Musts still arrive.
  • Won't have this time is written down too, so nobody adds it quietly. It can return in a later version.
  • Priorities are checked again at the end of every sprint.
  • Must بەشێکە لە بچووکترین بەرهەمێک کە هێشتا بەکار بێت. بپرسە: «ئەگەر نەبێت چی دەبێت؟» ئەگەر بەبێ ئەو بێسوود بێت، Mustـە؛ ئەگەر ڕێگایەکی تر هەبێت، نا.
  • Mustـەکان لە دەوروبەری ⁦60%⁩ی هەوڵ زیاتر نابن و Couldـەکان نزیکەی ⁦20%⁩. کاتێک کات کەم دێنێت، سەرەتا Couldـەکان لادەبرێن، بۆیە Mustـەکان هەر دەگەن.
  • ⁦Won't have this time⁩ـیش دەنووسرێت، بۆ ئەوەی کەس بە بێدەنگی زیادی نەکات. لە دواتردا دەتوانێت بگەڕێتەوە.
  • پێشینەییەکان لە کۆتایی هەموو دووپاتە دەپشکنرێنەوە.
Four buckets for Bazaar Cart 1.0.0. Must: choose products and grams with rounded prices (R1, R2); never sell more than the stock (R3); delivery fee (R4); Soran's list of new orders. Should: an SMS when the order leaves the shop. Could: reorder the last order with one tap. Won't have this time: card payment; delivery outside Sulaimani. A bar under the buckets: Must about 60 % of the effort, Should, Could about 20 %.چوار سەتڵ بۆ Bazaar Cart 1.0.0. Must: هەڵبژاردنی کاڵا و گرام بە نرخی بەرزکراوە (R1، R2)؛ هەرگیز لە کۆگا زیاتر نەفرۆشرێت (R3)؛ کرێی گەیاندن (R4)؛ لیستی داواکارییە نوێیەکانی سۆران. Should: نامەیەکی کورت کاتێک داواکارییەکە لە دوکان دەردەچێت. Could: دووپاتە داواکردنەوەی دوایین داواکاری بە یەک لێدان. Won't have this time: پارەدان بە کارت؛ گەیاندن بۆ دەرەوەی سلێمانی. شریتێک لە ژێر سەتڵەکان: Must نزیکەی 60%ی هەوڵ، Should، Could نزیکەی 20%.
Bazaar Cart's backlog for 1.0.0, sorted with MoSCoW. Bazaar Cart بۆ ⁦1.0.0⁩، بە ڕیزکراو.CêIT

From requirements to designلە پێداویستییەکانەوە بۆ دیزاین

Requirements say what to build; design decides how. SWEBOK describes design as turning requirements into plans that programmers can build from, in stages that zoom in:

دەڵێن چی دروست بکرێت؛ دیزاین بڕیار دەدات چۆن. SWEBOK دیزاین وەک گۆڕینی بۆ پلان وەسف دەکات کە بتوانن لێیەوە دروست بکەن، بە چەند قۆناغێک کە لێی نزیک دەبنەوە:

  • Architecture: the whole system and how its big pieces talk — for Bazaar Cart, a phone app, a server and an SQLite database.
  • High-level design: the main parts inside and how they connect — prices, delivery, orders, storage.
  • Detailed design: inside each part — classes, functions, data and algorithms, such as line_price(price_per_kg, grams).
  • : هەموو سیستەمەکە و ئەوەی پارچە گەورەکانی چۆن قسە دەکەن — بۆ Bazaar Cart، مۆبایل، و .
  • دیزاینی ئاستی بەرز: بەشە سەرەکییەکانی ناوەوە و ئەوەی چۆن بە یەکەوە دەبەسترێن — نرخ، گەیاندن، داواکاری، هەڵگرتن.
  • دیزاینی ورد: ناوەوەی هەر بەشێک — ، ، و ئەلگۆریزمەکان، وەک line_price(price_per_kg, grams).

A house in Sulaimani is planned the same way: the plot plan, then the floor plan, then where each socket goes. Chapter 4 of this course returns to architecture with layers and MVC, MVP and MVVM.

خانوویەک لە سلێمانی بە هەمان شێوە پلانی بۆ دادەنرێت: نەخشەی زەوییەکە، دواتر نەخشەی نهۆمەکان، دواتر شوێنی هەر پریزێک. بەشی 4ی ئەم خولە بە چینەکان و MVC، MVP و MVVM دەگەڕێتەوە بۆ .

Three panels that zoom in. Architecture: a phone, a server and a database with arrows between them. High-level design: four parts inside the server — prices, delivery, orders, storage. Detailed design: inside the prices part, the function line_price(price_per_kg, grams) rounds up to 250 and raises ValueError outside 100 to 10,000 g.سێ پانێڵ کە لە نزیکەوە دەڕوانن. تەلارسازیی نەرمەواڵە: مۆبایلێک، ڕاژەکارێک و بنکەدراوەیەک بە تیر لە نێوانیاندا. دیزاینی ئاستی بەرز: چوار بەش لە ناو ڕاژەکارەکەدا — نرخ، گەیاندن، داواکاری، هەڵگرتن. دیزاینی ورد: لە ناو بەشی نرخدا، کرداری line_price(price_per_kg, grams) بۆ 250 بەرزی دەکاتەوە و لە دەرەوەی 100 تا 10,000 گرام ValueError دروست دەکات.
Design zooms in: the whole system, its parts, then the inside of each part.دیزاین نزیک دەبێتەوە: هەموو سیستەمەکە، بەشەکانی، دواتر ناوەوەی هەر بەشێک.CêIT

From requirements to designلە پێداویستییەکانەوە بۆ دیزاین

Design drawings, and one class diagramوێنەکانی دیزاین و هێڵکارییەکی کلاسی UML

Each design question has its own drawing, and each is taught in its own CêIT lesson: what a screen shows → a wireframe; what data is stored → an E-R model; in which order steps happen → a flowchart; which classes the code needs → a UML class diagram (how to draw a class box).

هەر پرسیارێکی دیزاین وێنەی خۆی هەیە و هەر یەکەیان لە وانەیەکی تایبەتی CêITـدا فێر دەکرێت: شاشەیەک چی پیشان دەدات ← وایەرفرەیم؛ چ هەڵدەگیرێت ← مۆدێلی قەوارە و پەیوەندی؛ هەنگاوەکان بە چ ڕیزێک ڕوو دەدەن ← هێڵکاریی ڕەوت؛ کۆدەکە چ پێویستە ← (چۆن چوارگۆشەی کلاسێک بکێشیت).

Here is Bazaar Cart's first class diagram. An Order holds one or more OrderLines, and each line refers to exactly one Product. Each box shows the data first and the methods below.

ئەمە یەکەم Bazaar Cartـە. Order یەک یان زیاتر OrderLineـی تێدایە و هەر دێڕێک ئاماژە بە ڕێک یەک Product دەکات. هەر چوارگۆشەیەک سەرەتا و لە خوارەوە پیشان دەدات.

Three UML class boxes. Product: name, price_per_kg, stock_grams. OrderLine: product, grams, and the method line_price(). Order: lines, and the methods goods_total(), delivery_fee() and total(). A line with a filled diamond at Order goes to OrderLine with 1 and 1..*. A line from OrderLine to Product is marked * and 1.سێ چوارگۆشەی کلاسی UML. Product: name، price_per_kg، stock_grams. OrderLine: product، grams و میتۆدی line_price(). Order: lines و میتۆدەکانی goods_total()، delivery_fee() و total(). هێڵێک بە ئەڵماسێکی پڕ لای Order بۆ OrderLine دەچێت بە 1 و 1..*. هێڵێک لە OrderLineـەوە بۆ Product بە * و 1 نیشان کراوە.
Bazaar Cart's first class diagram: an order owns its lines; each line points to one product.یەکەم Bazaar Cart: داواکارییەک خاوەنی دێڕەکانیەتی؛ هەر دێڕێک ئاماژە بە یەک کاڵا دەکات.CêIT

Good parts: coupling and cohesionبەشی باش: پێکەوەبەستراوی و یەکگرتوویی

Two old principles guide good designs. Modularity: split a program into parts with one job each, as David Parnas argued in 1972. Separation of concerns: keep screens, rules and storage apart (separation of concerns). Then judge your parts in two ways:

دوو بنەمای کۆن ڕێنمایی دیزاینی باش دەکەن. : دابەش بکە بۆ چەند بەشێک کە هەر یەکەیان یەک کاری هەیە، وەک دەیڤید پارناس لە ⁦1972⁩ـدا بەرگریی لێ کرد. : شاشەکان، یاساکان و هەڵگرتن لێک جیا بکەرەوە (جیاکردنەوەی بەرپرسیارێتییەکان). دواتر بەشەکانت بە دوو شێوە هەڵبسەنگێنە:

  • Coupling — how much one part depends on the inside of another. Aim for low (loose) coupling: you can change delivery.py without touching the screens.
  • Cohesion — how well the things inside one part belong together. Aim for high cohesion: delivery.py holds only delivery rules.
  • — بەشێک تا چەند پشت بە ناوەوەی بەشێکی تر دەبەستێت. ئامانج کەم (شل)ە: دەتوانیت delivery.py بگۆڕیت بێ ئەوەی دەست لە شاشەکان بدەیت.
  • — ئەو شتانەی لە ناو یەک بەشدان تا چەند پێکەوە دەگونجێن. ئامانج زۆرە: delivery.py تەنیا یاساکانی گەیاندنی تێدایە.
A wedding kitchenچێشتخانەی ئاهەنگی بووک گواستنەوە

In a wedding kitchen one cook makes the rice, one the dolma and one the kebab. Each station keeps its own tools (high cohesion), and only finished pots pass through one window (low coupling). If the dolma cook is ill, someone else takes his station and the rice does not change.

لە چێشتخانەی ئاهەنگی بووک گواستنەوەدا، چێشتلێنەرێک برنج دروست دەکات، یەکێک دۆڵمە و یەکێک کەباب. هەر شوێنێک ئامرازەکانی خۆی لای خۆی دەهێڵێتەوە ( زۆر) و تەنیا مەنجەڵی ئامادە لە یەک پەنجەرەوە دەدرێت ( کەم). ئەگەر چێشتلێنەری دۆڵمە نەخۆش بێت، کەسێکی تر شوێنەکەی دەگرێتەوە و برنجەکە ناگۆڕێت.

Where the analogy stops workingسنووری ئەم نموونەیە

Cooks can talk and help each other; software parts only “talk” through the functions you give them.

چێشتلێنەرەکان دەتوانن قسە بکەن و یارمەتیی یەکتر بدەن؛ بەشەکانی تەنیا لە ڕێگەی ئەو پێیانی دەدەیت «قسە دەکەن».

Two designs side by side. Left, tangled: three files, each mixing screen code, prices, delivery and SMS, with many crossing wires between their insides: high coupling, low cohesion. Right, tidy: prices.py, delivery.py, orders.py and screens.py, each with related things only, joined by a few thin arrows through their functions: low coupling, high cohesion.دوو دیزاین لە تەنیشت یەکتر. چەپ، تێکئاڵاو: سێ فایل، هەر یەکەیان کۆدی شاشە، نرخ، گەیاندن و نامەی کورت تێکەڵ دەکات، بە زۆر وایەری تێکهەڵکێش لە نێوان ناوەوەیاندا: پێکەوەبەستراویی زۆر، یەکگرتوویی کەم. ڕاست، ڕێکوپێک: prices.py، delivery.py، orders.py و screens.py، هەر یەکەیان تەنیا شتی پەیوەندیداری تێدایە و بە چەند تیرێکی باریک لە ڕێگەی کردارەکانیانەوە بەستراون: پێکەوەبەستراویی کەم، یەکگرتوویی زۆر.
Aim for low coupling between parts and high cohesion inside each part.ئامانج کەمە لە نێوان بەشەکان و زۆرە لە ناو هەر بەشێکدا.CêIT

From a requirement to a checkلە پێداویستییەکەوە بۆ پشکنینێک

A testable requirement can become a check that the computer runs. Here are R4's acceptance criteria as three assert lines (what assert does). If every check holds, the program prints its message; if one fails, Python stops with AssertionError.

تاقیکراوە دەتوانێت ببێت بە پشکنینێک کە کۆمپیوتەر جێبەجێی دەکات. ئەمانە ⁦R4⁩ن وەک سێ دێڕی assert (assert چی دەکات). ئەگەر هەموو پشکنینەکان ڕاست بن، پەیامەکەی چاپ دەکات؛ ئەگەر یەکێکیان شکست بهێنێت، Python بە AssertionError دەوەستێت.

R4 as code and three checks⁦R4⁩ وەک کۆد و سێ پشکنینdelivery.pyPYTHONType in a terminalلە تێرمیناڵدا بینووسە
# Bazaar Cart, rule R4 (made-up prices in IQD):
# delivery inside Sulaimani costs 3,000 IQD,
# and it is free when the goods total is 50,000 IQD or more.
DELIVERY_FEE = 3_000
FREE_DELIVERY_FROM = 50_000


def delivery_fee(goods_total):
    """Delivery fee in IQD for one order inside Sulaimani."""
    if goods_total >= FREE_DELIVERY_FROM:
        return 0
    return DELIVERY_FEE


# R4's acceptance criteria as three checks
assert delivery_fee(49_750) == 3_000   # just below the limit: pay
assert delivery_fee(50_000) == 0       # exactly at the limit: free
assert delivery_fee(120_000) == 0      # far above the limit: free
print("R4: all three checks passed")
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 10

>= because the limit itself (50,000) is already free.

>= چونکە خودی سنوورەکە ⁦(50,000)⁩ بێبەرانبەرە.

Lineدێڕی 16-18

One check per example: just below, exactly at and far above the limit.

یەک پشکنین بۆ هەر نموونەیەک: کەمێک لە خوار، ڕێک لەسەر و زۆر لە سەرووی سنوورەکە.

Now one thread runs from Soran's rule to the code: R4 → story BC-7 → acceptance criteria → checks → delivery_fee(). This traceability tells the team, when a rule changes, which stories, tests and code must change too. Automated tests turn checks like these into a real test suite.

ئێستا یەک دەزوو لە یاساکەی سۆرانەوە بۆ کۆدەکە دەڕوات: ⁦R4⁩ ← چیرۆکی ⁦BC-7⁩ ← ← پشکنینەکان ← delivery_fee(). ئەمە پێی دەوترێت : کاتێک یاسایەک دەگۆڕێت، بە تیمەکە دەڵێت کام چیرۆک، تاقیکردنەوە و کۆد دەبێت ئەوانیش بگۆڕێن. تاقیکردنەوەی خۆکار پشکنینی لەم جۆرە دەکات بە کۆمەڵە تاقیکردنەوەیەکی ڕاستەقینە.

Animation in six steps. 1: the rule card R4 lights up. 2: the story card BC-7 lights up, linked to R4. 3: the two Given–When–Then scenarios light up. 4: the three assert lines light up. 5: the delivery_fee() function lights up. 6: Soran changes R4 to free delivery from 60,000 IQD, and the whole chain glows: every linked item must be checked.
Animation in six steps. 1: the rule card R4 lights up. 2: the story card BC-7 lights up, linked to R4. 3: the two Given–When–Then scenarios light up. 4: the three assert lines light up. 5: the delivery_fee() function lights up. 6: Soran changes R4 to free delivery from 60,000 IQD, and the whole chain glows: every linked item must be checked.
Traceability: from a rule to the code, and back when the rule changes.: لە یاسایەکەوە بۆ کۆدەکە و بە پێچەوانەوە کاتێک یاساکە دەگۆڕێت.CêIT

From a requirement to a checkلە پێداویستییەکەوە بۆ پشکنینێک

When a check failsکاتێک پشکنینێک شکست دەهێنێت

Karwan types > instead of >= on line 10. Two checks still pass, but the one exactly at the limit fails:

کاروان لە دێڕی ⁦10⁩ـدا لەبری >= دەنووسێت >. دوو پشکنین هێشتا دەردەچن، بەڵام ئەوەی ڕێک لەسەر سنوورەکەیە شکست دەهێنێت:

A common mistake: > instead of >=هەڵەیەکی باو: > لەبری >=delivery.pyPYTHONType in a terminalلە تێرمیناڵدا بینووسە
# Bazaar Cart, rule R4 (made-up prices in IQD):
# delivery inside Sulaimani costs 3,000 IQD,
# and it is free when the goods total is 50,000 IQD or more.
DELIVERY_FEE = 3_000
FREE_DELIVERY_FROM = 50_000


def delivery_fee(goods_total):
    """Delivery fee in IQD for one order inside Sulaimani."""
    if goods_total > FREE_DELIVERY_FROM:
        return 0
    return DELIVERY_FEE


# R4's acceptance criteria as three checks
assert delivery_fee(49_750) == 3_000   # just below the limit: pay
assert delivery_fee(50_000) == 0       # exactly at the limit: free
assert delivery_fee(120_000) == 0      # far above the limit: free
print("R4: all three checks passed")

The traceback names line 17, the check at exactly 50,000 IQD, so the bug is found before any customer pays a wrong fee. The fix is one character: goods_total >= FREE_DELIVERY_FROM. Checks written straight from the acceptance criteria catch exactly these mistakes at a limit.

ناوی دێڕی ⁦17⁩ دەبات، پشکنینەکەی ڕێک لەسەر ⁦50,000⁩ دینار، بۆیە پێش ئەوەی هیچ کڕیارێک کرێیەکی هەڵە بدات دەدۆزرێتەوە. چاککردنەکە یەک پیتە: goods_total >= FREE_DELIVERY_FROM. ئەو پشکنینانەی ڕاستەوخۆ لە دەنووسرێن ڕێک ئەم هەڵانە لەسەر سنوور دەگرن.

Common mistakesهەڵە باوەکان

Exercisesڕاهێنانەکان

ExerciseڕاهێنانFunctional or non-functional?فەنکشنی یان نافەنکشنی؟

Lana is building a timetable app for her high school in Duhok. Sort these into functional (F) and non-functional (NF): (a) a student sees today's lessons; (b) the app opens in under 2 seconds; (c) a teacher can swap two lessons; (d) it works without internet after the first download; (e) it shows the next lesson's room; (f) all text is in Kurdish (Badini and Sorani spelling).

لانا خشتەی وانەکان بۆ قوتابخانە ئامادەییەکەی لە دهۆک دروست دەکات. ئەمانە ڕیز بکە بۆ فەنکشنی ⁦(F)⁩ و نافەنکشنی ⁦(NF): (a)⁩ قوتابییەک وانەکانی ئەمڕۆ دەبینێت؛ ⁦(b)⁩ لە کەمتر لە 2 چرکەدا دەکرێتەوە؛ ⁦(c)⁩ مامۆستایەک دەتوانێت دوو وانە بگۆڕێتەوە؛ ⁦(d)⁩ دوای یەکەم بەبێ کار دەکات؛ ⁦(e)⁩ ژووری وانەی داهاتوو پیشان دەدات؛ ⁦(f)⁩ هەموو دەقەکان بە کوردین (ڕێنووسی بادینی و سۆرانی).

Hintئاماژە

Use the perfect-computer test.

تاقیکردنەوەی کۆمپیوتەری تەواو بەکار بهێنە.

Show answerوەڵامەکە پیشان بدە

F: (a), (c), (e) — behaviour you would still need on a perfect computer. NF: (b) speed, (d) working offline (a limit of real networks), (f) language.

⁦F: (a)⁩، ⁦(c)⁩، ⁦(e)⁩ — ڕەفتارێک کە لەسەر کۆمپیوتەرێکی تەواویش هەر پێویستە. ⁦NF: (b)⁩ خێرایی، ⁦(d)⁩ کارکردن بەبێ (سنوورێکی تۆڕە ڕاستەقینەکان)، ⁦(f)⁩ زمان.

ExerciseڕاهێنانMake it testableتاقیکراوەی بکە

Rewrite each requirement so that Dilan can test it: (1) “The timetable must load quickly.” (2) “Changes must reach students soon.” (3) “The app must be secure.”

هەر دووپاتە بنووسەوە بۆ ئەوەی دیلان بتوانێت تاقیی بکاتەوە: ⁦(1)⁩ «خشتەکە دەبێت بە خێرایی بار ببێت.» ⁦(2)⁩ «گۆڕانکارییەکان دەبێت زوو بگەنە قوتابیان.» ⁦(3)⁩ « دەبێت پارێزراو بێت.»

Show answerوەڵامەکە پیشان بدە
  • (1) On the school Wi-Fi, today's timetable appears within 2 seconds after the app opens.
  • (2) A lesson change made by a teacher appears on students' phones within 5 minutes.
  • (3) Split it: only teachers who sign in can change lessons; students' names are never shown to other schools. Each part can now be checked.
  • ⁦(1)⁩ لەسەر قوتابخانە، خشتەی ئەمڕۆ لە ماوەی 2 چرکەدا دوای کردنەوەی دەردەکەوێت.
  • ⁦(2)⁩ گۆڕینی وانەیەک کە مامۆستایەک کردوویەتی لە ماوەی 5 خولەکدا لەسەر مۆبایلی قوتابیان دەردەکەوێت.
  • ⁦(3)⁩ دابەشی بکە: تەنیا ئەو مامۆستایانەی چوونەتە ژوورەوە دەتوانن وانەکان بگۆڕن؛ ناوی قوتابیان هەرگیز بە قوتابخانەکانی تر پیشان نادرێت. ئێستا هەر بەشێک دەپشکنرێت.
ExerciseڕاهێنانThree stories and a scenarioسێ چیرۆک و سیناریۆیەک

Write three user stories for Lana's app (one for a student, one for a teacher, one for the head teacher), then one Given–When–Then scenario for the teacher's story.

سێ بۆ لانا بنووسە (یەکێک بۆ قوتابی، یەکێک بۆ مامۆستا، یەکێک بۆ بەڕێوەبەر)، دواتر یەک سیناریۆی ⁦Given–When–Then⁩ بۆ چیرۆکەکەی مامۆستا.

Show answerوەڵامەکە پیشان بدە
  • Student: As a student, I want to see my next lesson and its room, so that I am not late.
  • Teacher: As a teacher, I want to swap two of my lessons, so that I can cover a sick colleague.
  • Head teacher: As the head teacher, I want to see which rooms are free, so that I can plan exams.
  • قوتابی: وەک قوتابییەک، دەمەوێت وانەی داهاتووم و ژوورەکەی ببینم، بۆ ئەوەی دوا نەکەوم.
  • مامۆستا: وەک مامۆستایەک، دەمەوێت دوو لە وانەکانم بگۆڕمەوە، بۆ ئەوەی جێگای هاوکارێکی نەخۆشم بگرمەوە.
  • بەڕێوەبەر: وەک بەڕێوەبەر، دەمەوێت ببینم کام ژوور بەتاڵە، بۆ ئەوەی پلانی تاقیکردنەوەکان دابنێم.
One possible scenarioسیناریۆیەکی گونجاوTEXT
Given Mr Soran teaches class 10B in lesson 3 on Monday
  And Ms Lana teaches class 10B in lesson 5 on Monday
When Mr Soran swaps lesson 3 with lesson 5
Then class 10B shows Ms Lana in lesson 3 and Mr Soran in lesson 5
  And both teachers get a notification
ExerciseڕاهێنانMoSCoW with 10 daysMoSCoW بە ⁦10⁩ ڕۆژ

Lana has 10 working days for version 1. Estimates: see today's timetable (2 days), sign in for teachers (2), swap lessons (2), offline mode (3), dark theme (1), exam calendar (3), chat between students (4). Sort them with MoSCoW so that Musts stay near 60 % of the time.

لانا ⁦10⁩ ڕۆژی کاری هەیە بۆ 1. خەمڵاندنەکان: بینینی خشتەی ئەمڕۆ (⁦2⁩ ڕۆژ)، چوونەژوورەوە بۆ مامۆستایان ⁦(2)⁩، گۆڕینەوەی وانەکان ⁦(2)⁩، کارکردن بەبێ ⁦(3)⁩، ڕووکاری تاریک ⁦(1)⁩، ساڵنامەی تاقیکردنەوەکان ⁦(3)⁩، چات لە نێوان قوتابیاندا ⁦(4)⁩. بە MoSCoW ڕیزیان بکە بۆ ئەوەی Mustـەکان لە نزیک ⁦60%⁩ی کاتەکەدا بمێننەوە.

Show answerوەڵامەکە پیشان بدە

One good answer: Must — timetable, teacher sign-in, swapping (6 days = 60 %). Should — offline mode (3). Could — dark theme (1). Won't have this time — exam calendar and chat (they do not fit, and chat needs safety rules for students). If time runs short, the dark theme goes first.

وەڵامێکی باش: Must — خشتە، چوونەژوورەوەی مامۆستا، گۆڕینەوە (⁦6⁩ ڕۆژ = ⁦60%⁩). Should — کارکردن بەبێ ⁦(3)⁩. Could — ڕووکاری تاریک ⁦(1)⁩. ⁦Won't have this time⁩ — ساڵنامەی تاقیکردنەوە و چات (جێیان نابێتەوە و چات پێویستی بە یاسای پاراستن هەیە بۆ قوتابیان). ئەگەر کات کەم بێنێت، سەرەتا ڕووکاری تاریک لادەبرێت.

ExerciseڕاهێنانStakeholders of Hawler Rideلایەنە پەیوەندیدارەکانی Hawler Ride

Hana and Rebin are building Hawler Ride, a taxi app for Erbil. List at least six stakeholders and one thing each needs.

هانا و ڕێبین Hawler Ride دروست دەکەن، تەکسی بۆ هەولێر. لانیکەم شەش بنووسە و یەک شت کە هەر یەکەیان پێویستیەتی.

Show answerوەڵامەکە پیشان بدە
  • Passengers: a fair price shown before the ride.
  • Drivers: clear pickup points and fast payment.
  • The taxi company owner: income and reports.
  • Traffic police and city rules: licensed drivers only.
  • Ordinary taxi drivers outside the app: the app affects their work.
  • Hana and Rebin, the team: code they can keep fixing for years.
  • سەرنشینان: نرخێکی دادپەروەرانە کە پێش سەفەرەکە پیشان بدرێت.
  • شۆفێران: شوێنی هەڵگرتنی ڕوون و پارەدانی خێرا.
  • خاوەنی کۆمپانیای تەکسی: داهات و ڕاپۆرت.
  • پۆلیسی هاتوچۆ و یاساکانی شار: تەنیا شۆفێری مۆڵەتدار.
  • شۆفێرە ئاساییەکانی تەکسی لە دەرەوەی : کار لە ئیشەکەیان دەکات.
  • هانا و ڕێبین، تیمەکە: کۆدێک کە بتوانن بۆ چەندین ساڵ چاکی بکەنەوە.
ExerciseڕاهێنانCoupling and cohesionپێکەوەبەستراوی و یەکگرتوویی

In Lana's app, timetable.py reads the database, decides who may swap lessons, and builds the screen. Suggest a better split and say what improves.

لە لانادا، timetable.py دەخوێنێتەوە، بڕیار دەدات کێ دەتوانێت وانەکان بگۆڕێتەوە و شاشەکە دروست دەکات. دابەشکردنێکی باشتر پێشنیار بکە و بڵێ چی باشتر دەبێت.

Show answerوەڵامەکە پیشان بدە

Split it into storage.py (reading and saving), rules.py (who may swap what) and screens.py (showing). Each file now has high cohesion, and they talk only through a few functions (low coupling), so the swap rule can change — and be checked with asserts — without touching the screen code.

دابەشی بکە بۆ storage.py (خوێندنەوە و پاشەکەوتکردن)، rules.py (کێ دەتوانێت چی بگۆڕێتەوە) و screens.py (پیشاندان). ئێستا هەر زۆری هەیە و تەنیا لە ڕێگەی چەند قسە دەکەن ( کەم)، بۆیە یاسای گۆڕینەوە دەتوانێت بگۆڕێت — و بە assert بپشکنرێت — بێ ئەوەی دەست لە کۆدی شاشەکە بدرێت.

Summaryپوختە

  • Ask why until you reach the real need; “an app” is a solution, not a requirement.
  • Stakeholders: everyone who takes part in, is affected by or can change the project. Gather requirements by interviews, watching the work, questionnaires, old records and prototypes — then read them back.
  • Functional = what the software does; non-functional = how well and with what. Good requirements are clear, one idea, testable and about the need.
  • User stories: As a …, I want …, so that … (card, conversation, confirmation; INVEST). Acceptance criteria: Given … When … Then … with real numbers.
  • MoSCoW orders the product backlog: Musts ≈ 60 % of the effort at most, Coulds are the contingency, Won'ts are written down.
  • Design zooms in: architecture → high-level design → detailed design; use the right drawing (wireframe, E-R model, flowchart, UML class diagram).
  • Aim for low coupling between parts and high cohesion inside them. Turn testable requirements into checks and keep traceability from rule to code.
  • بۆچی بپرسە تا دەگەیتە پێویستییە ڕاستەقینەکە؛ «» چارەسەرێکە، نەک .
  • : هەر کەسێک کە بەشداری پڕۆژەکە دەکات، کاری تێدەکرێت یان دەتوانێت بیگۆڕێت. بە چاوپێکەوتن، سەیرکردنی کار، فۆرمی پرسیار، تۆماری کۆن و کۆ بکەرەوە — دواتر بیانخوێنەرەوە بۆیان.
  • فەنکشنی = ئەوەی دەیکات؛ نافەنکشنی = چەند باش و لەگەڵ چی. باش ڕوون، یەک بیرۆکە، تاقیکراوە و لەبارەی پێویستییەکەن.
  • : وەک …، دەمەوێت …، بۆ ئەوەی … (کارت، گفتوگۆ، پشتڕاستکردنەوە؛ INVEST). : ⁦Given … When … Then⁩ … بە ژمارەی ڕاستەقینە.
  • ڕیز دەکات: Mustـەکان زۆرترین ≈ ⁦60%⁩ی هەوڵ، Couldـەکان یەدەگن، ⁦Won't⁩ـەکان دەنووسرێن.
  • دیزاین نزیک دەبێتەوە: ← دیزاینی ئاستی بەرز ← دیزاینی ورد؛ وێنەی گونجاو بەکار بهێنە (، ، ، ).
  • ئامانج کەمە لە نێوان بەشەکان و زۆرە لە ناویاندا. تاقیکراوە بکە بە پشکنین و لە یاساوە تا کۆد بپارێزە.

Next in the course: Git keeps the history of every change to Bazaar Cart's code — Git basics.

داهاتوو لەم خولەدا: Git مێژووی هەموو گۆڕانکارییەک لە کۆدی Bazaar Cartـدا هەڵدەگرێت — بنەماکانی Git.

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Git Basics: Saving the History of Your Codeبنەماکانی Git: پاشەکەوتکردنی مێژووی کۆدەکەت

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.

Appearanceڕووکار

Modeدۆخ
Styleشێواز
Coloursڕەنگەکان

Saved on this device only.تەنیا لەسەر ئەم ئامێرە پاشەکەوت دەکرێت.