TAILIEUCHUNG - Software Engineering For Students: A Programming Approach Part 26

Software Engineering For Students: A Programming Approach Part 26. 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 | 228 Chapter 16 Programming in the large interface Stackinterface Stack Figure A class and its interface implement every method described in the interface. Any deviation results in compiler errors. We can describe the relationship between a class and its interface using a UML class diagram. See for example Figure . In a UML class diagram an interface is shown as a rectangle. The interface name is preceded by the word interface . The implements relationship is shown as a dotted arrow. Interfaces can also be used to describe an inheritance structure. For example suppose we wanted to describe an interface for a Betterstack that is a subclass of the stack interface described above. We can write in Java public interface Betterstackinterface extends Stackinterface boolean empty which inherits the interface Stackinterface and states that the interface Betterstackinterface has an additional method named empty to test whether the stack is empty. We could similarly describe a whole tree structure of classes as interfaces describing purely their outward appearance and their subclass-superclass relationships. In summary the characteristics of an interface facility module description language are it is textual though we could think of tools to convert the text into graphics it is an extension of the programming language therefore consistent easy to learn and checkable by the compiler it allows specification of the external appearance of classes - their names their visible methods the parameters required. The advantages of being able to write descriptions like this are during design we can describe the grand structure of a piece of software in a fairly formal way. The description can be checked by a language processor. Interfaces and interoperability 229 during coding the description can be used as part of the class specification. The compiler can also check for consistency between the description and the class coding. during maintenance the description can be used

TỪ KHÓA LIÊN QUAN
TÀI LIỆU LIÊN QUAN