• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17

Programming Techniques

Extracts from this document...


Programming Techniques Programming technique is a way of * Unstructured programming, * procedural programming, * modular programming Unstructured Programming Usually, people start learning programming by writing small and simple programs consisting only of one main program. Here ``main program'' stands for a sequence of commands or statements which modify data which is global throughout the whole program. The main program directly operates on global data. It can be illustrated: This programming techniques provide tremendous disadvantages once the program gets sufficiently large. For example, if the same statement sequence is needed at different locations within the program, the sequence must be copied. This has lead to the idea to extract these sequences, name them and offering a technique to call and return from these procedures. Procedural Programming With procedural programming it is possible to combine returning sequences of statements into one single place. A procedure call is used to invoke the procedure. After the sequence is processed, flow of control proceeds right after the position where the call was made. With introducing parameters as well as procedures of procedures ( subprocedures) programs can now be written more structured and error free. For example, if a procedure is correct, every time it is used it produces correct results. Consequently, in cases of errors you can narrow your search to those places which are not proven to be correct. Now a program can be viewed as a sequence of procedure calls. The main program coordinates calls to procedures and hands over appropriate data as parameters. The data is processed by the procedures and, once the program has finished, the resulting data is presented. Thus, the flow of data can be illustrated as a hierarchical graph, a tree for a program with no subprocedures. A single program that is divided into small pieces called procedures. To enable usage of general procedures or groups of procedures also in other programs, they must be separately available. ...read more.


They would know what is in the specifications of the design, where it will state what the code should do in a range of circumstances. The tester will need to write a plan that uses valid, invalid and borderline values to cover all of the points in the specification. Valid data might include 34,150 and 250. Invalid data might include 'Gr'. Borderline data might include 99,100,101,199,200, 201,299,300 and 301. The document recording a good black box test plan will not only record what valid, invalid and borderline data will be used but will also * Predict the outcome when each of the pieces of test data is used * Record what actually happens when each piece of data is entered, just in case someone needs to check that the product was fully tested later on. * Record any action taken as a result of test being done Alpha Testing Software can be fully written and then tested using black box and white box testing. It can also be partially written and partially tested. Whichever approach is used the product, whether complete or only partially complete, can be passed to a restricted audience (normally a group of programmers) within the company that produced the software. They will use it, give feedback, will report any faults they find, make comments about the ease of use of the software and suggest improvements, for example. This kind of testing is known as 'alpha testing'. It is used to further improve a product and to help track down bugs. Beta Testing Once a product has been alpha tested, it can then be improved and 'finished off'. It is then released to a limited audience in return for their feedback. The audience might include reviewers, special customers and people who write textbooks about software products. This information can be used to further improve the quality of the final product before it is finally released and sold as a finished program to an awaiting public. ...read more.


- 1,3,-4,6,5 -To determine how it handles negative numbers. - 1,3,4,-6,5 -To determine whether it chooses the largest number according to magnitude or whether it takes the sign into consideration. - 1.5,3,4,5,6 - To determine whether it can deal with fractions. - 1,1,1,1,1 -To see what happens if the largest and the smallest are the same. Note. There are many more sensible sets of test data that could be used. These are just examples. Make sure that you read the question carefully and give 'different' sets of test data. Just changing the data doesn't make it different, it is the reason for the choice of data that must be different. 11 A. -Alpha testing is done by the programmer or in the software house. -Beta testing is done by the user. 12 A. - Translator compares reserved word/syntax (rules) in its dictionary - If different to what is in the dictionary the user can be told what and where the error is. -eg PLINT is not in the dictionary of words that it knows, so there must be an error. Note. The same example has been used again. I know this one is right, why risk changing it? 13 A. - Cross referencing of variables - checks the program for occurences of the same variable being used more than once. - Trace table. - As the program is run the values of the variables are printed out as the instructions are executed, allowing the user to see where sudden, unexpected, changes have occurred. Note. There are lots of possible answers here, always choose the two answers that you are absolutely sure of. 14(a) -Needed by people employed to maintain or amend the program in the future... -by explaining the logic and the reasoning behind the code. (b) -Indentation of groups of statements. -This not only makes the group stand out, but also ensures that the person looking at the code knows which statements should be treated together. - Use of sensible variable names. ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Computer Science section.

Found what you're looking for?

  • Start learning 29% faster today
  • 150,000+ documents available
  • Just £6.99 a month

Not the one? Search for your essay title...
  • Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

See related essaysSee related essays

Related AS and A Level Computer Science essays

  1. Discuss the relationship that exists in the UK between the legal rules that govern ...

    nomination committee with the majority of the committee being made up of non-executive directors, it also suggests that there should be a balance on the board of executive and non-executive directors. The appointment of directors also brings up a conflict in the law; employment law suggests that the managing director

  2. Computing Project

    to what I have written above ADOMembers ['surname']:=lbledSurname.Text; ADOMembers ['house number']:=lbledhousenumber.Text; ADOMembers ['street name']:=lbledstreetname.Text; ADOMembers ['Town']:=lbledtown.Text; ADOMembers ['Tel number']:=LbledTelno.Text; Adomembers ['Date Joined']:=date; ADOMembers ['Post Code']:=lbledpostcode.Text; ADOMembers ['Additional Notes']:=lbledaddnotes.Text; showmessage ('Member Has Been Added'); adomembers.post; end; end; end; procedure TFmRegAMem.Button1Click(Sender: TObject); begin fmmenu.show;//show this form end; end.

  1. Explain the different techniques of gathering information to answer an IT Technical problem or ...

    The support material will be a letter and an email and a meeting will be held so that the staff will be well informed and aware of what is going to happen. A letter will be produced which will be sent to the staff of Cranks Ltd twice, a week

  2. This report aimed to replicate Stroop's (1935) experiment. Using the repeated measures design and ...

    The main reason for this is that individual differences are eliminated and the time period for which to execute the experiment is minimised. This design, however, introduces order effects which include fatigue and practice effects. These effects can be minimised through counterbalancing, this involves splitting the participants into two equal groups.

  1. Explain sequence, selection and iteration as used in computer programming; outline the benefits of ...

    Below is a table of these three integer types with their ranges and size in bytes: Whole Number Types Data Type Storage Size Range / Value Byte 8 bits / 1 byte 0 to 255 Integer 16 bits / 2 bytes -32,768 to 32,767 Long 32 bits / 4 bytes

  2. Logic and Logic Gates

    The expression for this gate is . This means that Q = A (NOT OR) B Truth Table Input Output A Q 1 0 0 1 5. NOT Gate In a NOT Gate also know as an "Inverter", there is always 1 input.

  1. Describe the functions of each section within the shops and Head Office, paying particular ...

    in each shop and the ICT systems using within the warehouse Shops * Each shop has an EPOS terminal with barcode readers and card readers. Stock data is held on dedicated server connected to the EPOS terminals. * There is also a telephone connection to the banking system for authorisation of the card payments.

  2. Introduction to Robotic Algorithms Final Project: Interaction with the MagellanPro Robot

    After this: 1. $ cd <unpack_dir>/src 2. $ make This creates the following executables in <unpack_dir>/bin: 1. getdata The data retrieval program 2. makeimg The sensor data image generator 3. map_edit The polygonal map editor 4. prmgen The PRM generator 5. navigate The navigation program Getdata: The 'getdata' program is very simple to use; run it like

  • Over 160,000 pieces
    of student written work
  • Annotated by
    experienced teachers
  • Ideas and feedback to
    improve your own work