Thinking Procedurally

Cards (31)

  • What is the first stage of thinking procedurally in software development?
    Breaking down the problem into its component parts
  • What is the process called that involves breaking down a large, complex problem into smaller subproblems?
    Problem decomposition
  • What is the benefit of breaking down a problem into smaller subproblems?
    It makes the problem easier to manage and solve
  • What design method is commonly used to decompose problems?
    Top-down design
  • What is another name for top-down design?
    Stepwise refinement
  • What do higher levels in top-down design provide?
    An overview of a problem
  • What is the aim of using top-down design?
    To keep splitting problems into subproblems until each can be represented as a single task
  • What can each task be developed and tested as?
    A separate module or subroutine
  • What is the next stage after identifying the components of a problem?
    Building up to its solution
  • In the book reservation system example, what is the lowest-level component that needs to be implemented?
    Borrower name
  • How can the borrower name be implemented in the system?
    As a procedure called getName()
  • What does the getName() procedure check for?

    Whether or not a user is signed-in to their library account
  • What should happen if a user is not signed-in?
    They should be redirected to a page to register or sign-in
  • How should book details be entered by the user?
    Through a text entry field
  • What function could be implemented to handle book details?
    A function that returns the ISBN of the selected book
  • How should the collection location be implemented?
    As a function that returns the location specified by the user
  • Why is it impractical to use a text entry field for collection location?
    It raises the likelihood of erroneous data being entered
  • How should the collection location data be collected?
    Through a drop-down field in a form
  • What must be checked to determine book availability?

    Whether books under the selected ISBN are currently on loan or available
  • How could the check book availability function be programmed?
    As a function that returns ‘True’ if the book is available, or ‘False’ if not
  • What should be identified during the implementation stage?
    Tasks that could be solved using an already existing module, subroutine, or library
  • Why is the order of steps important when constructing a final solution?
    Some programs require certain inputs to be entered before processing can occur
  • What must be done to inputs before they can be passed onto the next subroutines?
    They need to be validated
  • What should programmers identify regarding subroutines?

    The order in which subroutines are executed and how they interact with each other
  • Why should programs be built to ensure operations are carried out in a specific order?
    To avoid raising errors
  • How should an adventure game be designed regarding level access?
    Users should not be able to access levels ahead of those they have unlocked
  • In a fast food delivery app, what should happen before users can select food?
    They must confirm their location
  • What should users do before they can pay in a fast food delivery app?
    They must confirm their order
  • What are the key components of problem decomposition in software development?
    • Breaking down a complex problem into smaller subproblems
    • Making the project easier to manage
    • Allowing division of tasks among a group of people
    • Considering underlying subproblems to achieve the desired result
  • What are the steps involved in top-down design?
    1. Break down problems into levels
    2. Higher levels provide an overview
    3. Lower levels specify details
    4. Split problems until each can be represented as a single task
    5. Aim for self-contained modules or subroutines
  • What considerations should be made regarding the order of operations in programming?
    • Certain inputs may need to be entered before processing
    • Inputs must be validated before passing to subroutines
    • Identify simultaneous execution possibilities
    • Determine the order of subroutine execution based on data requirements