TAILIEUCHUNG - Software Engineering For Students: A Programming Approach Part 21
Software Engineering For Students: A Programming Approach Part 21. This fully revised version of Doug Bell's Software Engineering: A Programming Approach continues to use the successful formula of the previous editions. The author's approach is to present the main principles, techniques and tools used in software engineering, one by one, chapter by chapter. This book is a unique introduction to software engineering for all students of computer science and its related disciplines. It is also ideal for practitioners wishing to remain current with new developments in the area | 178 Chapter 14 The basics Programming languages should also display a high degree of orthogonality. This means that it should be possible to combine language features freely special cases and restrictions should not be prevalent. Java and similar languages distinguish between two types of variables - built-in primitive types and proper objects. This means that these two groups must be treated differently for example when they are inserted into a data structure. A lack of orthogonality in a language has an unsettling effect on programmers they no longer have the confidence to make generalizations and inferences about the language. It is no easy matter to design a language that is simple clear and orthogonal. Indeed in some cases these goals would seem to be incompatible with one another. A language designer could for the sake of orthogonality allow combinations of features that are not very useful. Simplicity would be sacrificed for increased orthogonality While we await the simple clear orthogonal programming language of the future these concepts remain good measures with which the software engineer can evaluate the programming languages of today. Language syntax The syntax of a programming language should be consistent natural and promote the readability of programs. Syntactic flaws in a language can have a serious effect on program development. One syntactic flaw found in languages is the use of begin-end pairs or bracketing conventions for grouping statements together. Omitting an end or closing bracket is a very common programming error. The use of explicit keywords such as endif and endwhile leads to fewer errors and more readily understandable programs. Programs are also easier to maintain. For example consider adding a second statement with the Java if statement shown below. -------------------------------------------------------------------------- if integervalue 0 numberOfPositiveValues numberOfPositiveValues 1 .
đang nạp các trang xem trước