7.

Cards (155)

  • Software development lifecycle
    1. Analysis
    2. Design
    3. Coding
    4. Testing
  • Analysis
    • Abstraction
    • Decomposition of the problem
    • Identification of the problem
    • Gathering initial requirements
  • Design
    • Breaking down the program further
    • Using things like decomposition, structure diagrams, flow charts, and pseudo code
  • Coding
    • Writing the program code
    • Ongoing and continuous iterative testing of the code
  • Testing
    • Testing the program code to check that it works and meets the requirements
    • Using test data
  • There are different numbers of stages presented in various sources, ranging from 3 to 12 stages
  • The correct number of stages depends on the development methodology appropriate for the problem being solved
  • The 4 stages presented in the video will be more than sufficient for the exam
  • Computer systems can range from very small and bespoke through to very large and complex
  • Almost all computer systems can be broken down into a set of subsystems
  • Each subsystem can typically be divided into further subsystems until each subsystem performs a single task or action
  • Decomposing the Space Invaders system
    1. Use a top-down design structured approach
    2. Create a structure diagram
  • Decomposition and structure diagrams will be covered in more detail in later videos
  • Decomposition
    Breaking a complex problem down into smaller, more manageable parts
  • Dealing with many different stages of a large problem at once is much more difficult than breaking it down into a number of smaller problems and then solving those one at a time
  • Daily tasks
    • Getting up in the morning
    • Brushing your teeth
    • Traveling to school
    • Doing your homework
  • Crossing the road
    1. Stop before crossing
    2. Look left and right
    3. Is the road clear?
    4. If not, press the crossing button
    5. Wait for the lights to turn red
    6. Cross when the road is safe
  • Breakout clone game
    The player controls a paddle at the bottom of the screen, and the paddle can be moved left and right. The ball bounces off the paddle and is redirected towards the blocks above. If the ball hits a block, that block is removed. The aim is to remove all the blocks, but if the ball leaves the bottom of the screen, the player loses a life.
  • Programming the breakout clone game
    1. Display the paddle on the screen
    2. Make the paddle respond to keys to move left and right
    3. Prevent the paddle from moving off the left or right of the screen
    4. Display the ball on the screen
    5. Program the movement of the ball and how it interacts with the blocks
    6. Display the blocks on the screen
    7. Implement collision detection so when the ball hits a block, it's registered and the block is removed
    8. Implement winning or losing conditions based on score or number of lives remaining
    9. Add sound effects, background effects, and graphics to give the game flair
  • Input
    Electronic device takes input
  • Process
    Processes data
  • Output
    Delivers output
  • Computer programs and systems
    • Follow a very simple three or four stage process: Input, Process, Output, (Storage)
  • Games console
    • Input from controller controls, Processed by console hardware, Output as audio, visual display, vibration feedback
  • Storage
    Save permanent files for later use
  • When writing a computer program
    • Need to identify the inputs, processes, outputs, and storage requirements
  • Calculate the volume of a fish tank
    Gather length, height, depth inputs, Calculate volume (length x height x depth), Output the result
  • Calculate student test scores
    Get number of students, Prompt for each student's test score, Calculate highest, lowest, average, Output results, Save highest score to file
  • Decomposition
    Breaking a complex problem down into its smaller more manageable parts
  • Dealing with many different stages of a problem at once is more difficult than breaking it down into a number of smaller problems and solving those one at a time
  • Structure diagrams
    Used to help decompose a problem
  • Stepwise refinement
    The approach used to create structure diagrams
  • Creating a structure diagram
    1. Start with the name of the overall program
    2. Break the program down into the main tasks it needs to perform
    3. Break down any stages that are still too complex into smaller more manageable chunks
    4. Each node at the lowest level achieves one task and can then be coded as a single module or subprogram
  • Calculating pay
    1. Gross pay
    2. Gross deductions
  • Calculating deductions
    1. Income tax
    2. National insurance
    3. Non-paid sick days
    4. Pension contributions
  • Different sections of the program will be broken down to different degrees depending on how complex they are
  • The end result should be that each node at the lowest level achieves one task and can then be coded as a single module or subprogram
  • In the exam you need to be able to create, interpret, correct and refine various algorithms using both pseudocode and flowcharts
  • Flowchart
    A method of representing the sequence of steps in an algorithm in the form of a diagram
  • Creating a flowchart
    1. Start with a start symbol
    2. Follow the arrows
    3. Input a number from the keyboard and store in number 1
    4. Input a second number from the keyboard
    5. Ask if number 1 is greater than number 2
    6. If yes, output "The largest number is number 1"
    7. If no, output "The largest number is number 2"
    8. End