21.08.2013 Views

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

Software Engineering for Students A Programming Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16.3 A specification of this kind only specifies the method names and their<br />

parameters. It does not specify any more closely what a method does –<br />

other than via any comments.<br />

16.4 interface Clock {<br />

void init();<br />

void waitSeconds(int seconds);<br />

int getHours();<br />

int getMinutes();<br />

int getSeconds();<br />

}<br />

interface Display {<br />

void init();<br />

void flashLight();<br />

void unflashLight();<br />

void soundKlaxon();<br />

void unsoundKlaxon();<br />

void displayMessage(String message);<br />

void clearScreen();<br />

}<br />

interface Heart {<br />

int readRate();<br />

int readPressure();<br />

}<br />

interface Lungs {<br />

int readRate();<br />

}<br />

interface Temp {<br />

int readTemp();<br />

}<br />

16.5 public class Circle implements Displayable<br />

Further reading 235<br />

Further reading<br />

•A good collection of papers from the computer science literature which critically evaluate<br />

and compare these three programming languages: A. Feuer and N. Gehani, Comparing<br />

and Assessing <strong>Programming</strong> Languages, Ada, Pascal and C, Prentice Hall, 1984.<br />

An excellent text <strong>for</strong> students wishing to explore further the fundamental principles<br />

underlying programming languages: B.J. Maclennan, Principles of <strong>Programming</strong><br />

Languages: Design, Evaluation and Implementation, Dryden Press, 1987.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!