Structured

Cards (124)

  • Structured programming is a style in programming paradigm of dividing a problem into sub-problems, and sub-problems into sub-sub-problems, and so on, (top down design) then solving each sub-sub-problem individually to produce sub sub-solutions, and combining the sub-solutions to form the solution (bottom up design)
  • Function
    Another name of a function is a procedure, and therefore, this style is also known as procedural style of programming
  • Constructs used in structured programming

    • Sequence
    • Selection
    • Repetition
  • Control structures
    The three basic constructs (sequence, selection, repetition)
  • Using these three basic control structures, it is possible to write standardized programs, which are easy to read and understand
  • The final computer program (consisting of all the functions) will be the solution
  • Why we use structured programming
    • It breaks up a problem into sub-problems and this makes problems more understandable and therefore easy to solve
    • The solution to the problem is also modifiable in future
    • It makes the program more efficient
    • Having small sections of a program running saves memory space and also CPU's
  • Another programming paradigm popular nowadays is the object-oriented programming style
  • Object-oriented programming style uses the concept of classes and objects in programming, but also uses functions to implement these concepts. Therefore, it applies structured programming
  • Still another programming paradigm is event driven programming whereby programs procedures respond to events from the user
  • Structured programming is universal starting level of learning programming
  • Steps in developing structured programs
    1. Analyze the problem
    2. Design the program using a design tool
    3. Code the program
    4. Compile
    5. Test
    6. Run
    7. Maintain the program
  • Algorithm
    A procedure for solving a problem in terms of the action to be executed, and the order in which these actions are executed
  • Qualities of a good algorithm
    • It should be clear, precise and easy to follow
    • It should show the exact logic of the program
    • It should be general, i.e. not specific to a programming language
  • Compiling is the process of converting the source codes into object code
  • Steps of producing structured programs
    1. Analyze the problem
    2. Design the program using a design tool
    3. Code the program
    4. Compile
    5. Test
    6. Run
    7. Maintain the program
  • To produce the executable program from the source code requires three stages: pre-process, compile, and link
  • Maintaining the program involves making changes to improve the functionality of the program, to remove possible previously undetected errors, to cater for newly discovered user needs, or to cater for changed technology
  • Data is raw facts that the computer needs in its processing
  • Information
    Processed data
  • Processing
    The conversion of data into information. It involves activities such as computing, sorting, rearranging, searching, and computing variance or net pay
  • A computer is an electronic device for doing data processing. It is a hardware tool that follows instructions that instruct it on how exactly to do processing
  • Inputs
    The data that the computer receives from the user (through the inputs device e.g. keyboard)
  • Outputs
    What is displayed to the user (through the outputs device e.g. monitor)
  • Inputting
    Receiving inputs from the user
  • Outputting
    Displaying the outputs to the user
  • Programming personnel
    • Computer programmer
    • System analyst
    • Database developer
    • Clerk
    • Software engineer
    • Analyst programmer
  • Computer program
    A set of coded instructions given to the computer, and represents a logical solution to a problem. It directs a computer in performing various operations/tasks on the data supplied to it
  • Computer programs may be written by the hardware manufacturers, Software houses, or a programmer to solve user problems on the computer
  • Programming
    The process of designing a set of instructions (computer programs) which can be used to perform a particular task or solve a specific problem
  • Overall process of software development
    1. Analysis
    2. Design
    3. Program writing
    4. Testing
    5. Maintenance
  • Analyst programmer

    Does the combined work of both the system analyst and the programmer
  • Computer program
    A set of coded instructions given to the computer, and represents a logical solution to a problem
  • Examples of Programs
    • A program to compute the information shown above
    • The calculator is one of the simple's type of computer that contains some software instruction
    • System software's
  • Programming process
    1. Analyzing of an application
    2. Designing of a solution
    3. Coding for the processor
    4. Testing to produce an operating program
    5. Development of other procedures to make the system function
  • The program created must specify in detail the logical steps to be taken & the method of processing the data input into the computer in order to carry out the specified task
  • Programming language
    A set of symbols (a language) which a computer programmer uses to solve a given problem using a computer
  • What a computer program typically does
    1. Receive some data from the user (inputs the data)
    2. Processes the inputs to obtain results (or computes the information) using appropriate formulae
    3. Shows the results to the user (outputs the results)
  • Example 1: Computing the area and the circumference of a circle
    • Inputs the radius
    • Compute the area (using appropriate formula)
    • Computer the circumference (using appropriate formula)
    • Output the area and the circumference
  • Example 2: Computing the variance of a set of numbers
    • Inputs all the numbers
    • Calculate the mean of the numbers using appropriate formula
    • Compute the variance using the appropriate formula
    • Output the variance