Presentation on theme: "Lecture 9: Implementation Dr Valentina Plekhanova University of Sunderland, UK."— Presentation transcript:
Lecture 9: Implementation Dr Valentina Plekhanova University of Sunderland, UK
Lecture 9Valentina Plekhanova 2 Use the design document as a guide Implementation is the process of translating the detailed design into code.
Lecture 9Valentina Plekhanova 3 Choice of Programming Languages In most cases, the issue of which programming language to use simply does not arise.
Lecture 9Valentina Plekhanova 4 Choice of Programming Languages However, if the contract specifies that the product is to be implemented in the most suitable language then there are a number of factors to consider: Cost Maintenance Available knowledge/skills of human resources
Lecture 9Valentina Plekhanova 5 …The Software Crisis (Lecture 1) How can we cope with the size and complexity of modern computer programs? How can we reduce the time and cost of program development? How can we increase our confidence that the finished programs work correctly?
Lecture 9Valentina Plekhanova 6 Programming Languages software crisis One approach to the software crisis is to design new programming languages that: Allow programs to be written clearly, concisely, and at a high-level of abstraction; Support reusable software components ; Encourage the use of formal verification; Permit rapid prototyping; Provide powerful problem-solving tools.
Lecture 9Valentina Plekhanova 7 Structured Programming The development of structured programming took place between 1966 to These included: Mathematical theory: Mathematical theory: the development of control structures. Dijkstra’s letter: Dijkstra’s letter: the harmful effect of the GoTo statement. Knuth’s articleGoTo Knuth’s article: the use of the GoTo statement.
Lecture 9Valentina Plekhanova 8 Advantages of Structured Programming: Goal & Advantages goal of structured programming The goal of structured programming is to create correct programs that are easy to write, understand and change. Advantages: Advantages: Easy to Write Productivity Time: Time: Several programmers can work on a single, large program, each working on a different module. Reusability: Reusability: Procedures written for one program can be reused in other programs requiring the same task.
Lecture 9Valentina Plekhanova 9 Structured Programming: Advantages Easy to Test and Debug Easy to Read and Understand Easy to Change/Correct
Lecture 9Valentina Plekhanova 10 Functional Programming … Functional programming Functional programming is style of programming in which the primary method of computation is the application of functions to arguments. Programs written in functional programming languages are a set of mathematical relationships between objects.
Lecture 9Valentina Plekhanova 11 Logic Programming … Logic programming Logic programming is characterised by programming with relations and inference: composition of relations, backtracking, type checking. logic program A logic program consists of a set of axioms and a goal statement.
Lecture 9Valentina Plekhanova 12 Object Oriented Programming Object-oriented programming Object-oriented programming is a method of programming based on a hierarchy of classes, and well-defined & cooperating objects. Instead of thinking about program flow from the first line of code to the last line of code, you need to think about creating objects. objects actionsdatalogic OOP is organised around objects rather than actions, data rather than logic.
Lecture 9Valentina Plekhanova 13 Good Programming Practices Many recommendations are formulated on good coding style, but general points are: Use of consistent and meaningful variable names Use of self-documented code Use of parameters Good code layout increases readability Avoid nested IF statements.
Lecture 9Valentina Plekhanova 14 Coding Standards & Team Organisation No coding standards can ever be applicable under all possible circumstances. The aim of coding standards is to make maintenance easier.
Lecture 9Valentina Plekhanova 15 Portability & Testing Generally, products run on a variety of different hardware/operating system combinations. Aspects to be considered include: Hardware incompatibilities Operating system incompatibilities Numerical software incompatibilities Compiler incompatibilities