Subject Infrastructure Repository

3
Get Access!
 
Home
SIR Software Objects
 
SIR Users and Publications
Frequently Asked Questions
Repository License
 
Acknowledgments

Median - Calculate Median of 3 Inputs Algorithm

The Median subject returns the median of three user specified input numbers. It is based on the "mid" program in Dr. James A. Jones' Ph.D. dissertation from Georgia Institue of Technology published in 2008.

This particular program version is annotated with new assertions that check correctness of the median algorithm. These assertions can simply be used as runtime checks for test executions as demonstrated by the three given tests or be utilized in the evaluation of assertion-driven techniques, e.g., as in Yang[Yang1] et al.'s ICSE 2014 paper on iProperty.

To execute the program simply invoke JUnit to run the example test cases or directly invoke the median method from another Java method.

[Yang1]. Guowei Yang, Sarfraz Khurshid, Suzette Person, and Neha Rungta, "Property Differencing for Incremental Checking", in proceedings of the 36th International Conference on Software Engineering (ICSE 2014), Hyderabad, India, May 31 - June 7, 2014, pages 1059-1070, © 2014 ACM, New York, NY, USA, 978-1-4503-2756

 


Try the following link to upgrade the page display. (Explanation)