11.07.2015 Views

Software Reuse In Final Year Projects: A Code of Practice Contents

Software Reuse In Final Year Projects: A Code of Practice Contents

Software Reuse In Final Year Projects: A Code of Practice Contents

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• (3) Create a new class which overrides the <strong>In</strong>tArray sort code by making it sort in descending order• . . .Option (2) is the nicest design, but option (3) is the easiest to code 17 . For simplicity we chose a variation onoption (3) in the code below:// Extension1.java - reuse <strong>of</strong> <strong>In</strong>tArray// Author Dr J Paul Gibson// Version 1 - 29/10/2003// For use in TR-2003-12// <strong>Code</strong> <strong>of</strong> practice for reuse <strong>of</strong> s<strong>of</strong>tware// Re-use <strong>of</strong> <strong>In</strong>tArray class written by J P Gibson// Original source file: Example1.javaimport <strong>In</strong>tArray.*;class Extension1 extends <strong>In</strong>tArray{// Overrides sort method to sort ’downwards’public void sort(){for (int i =0; i

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

Saved successfully!

Ooh no, something went wrong!