hoosing the Optimal Object-Oriented Implementation using Analytic Hierarchy Process Naunong Sunanta honlameth Arpnikanondt King Mongkut s University of Technology Thonburi, naunong@sit.kmutt.ac.th King Mongkut s University of Technology Thonburi, chonlameth@sit.kmutt.ac.th Abstract Techniques for a quantitative measurement of object-oriented design quality typically measure design quality attributes (see, e.g. [], [], [], [9] to obtain numerical values that collectively contribute to a different degree of optimality toards a specific design goal. When several implementations exist for a particular design, choosing the optimal implementation for a given design goal could be challenging. This paper proposes that the analytic hierarchy process (AHP technique [] can provide a convenient means to effectively assist softare developers in rationalizing among several implementations to select one that is optimal as per a specified design goal. For a given source code, the proposed method computes design quality attributes as defined in the first level of the quality model of object-oriented design (QMOOD []. Six design quality attributes are used that include functionality, effectiveness, understandability, extendibility, flexibility and reusability. The paper then describes ho AHP is applied against each set of the computed design quality attributes and a design goal in order to derive the quality attribute eight factors, and subsequently, the quality index that is used to indicate the optimality of a specific implementation ith respect to a specific design goal. Discussion on the validity of the proposed method furnishes a concrete evidence of the effectiveness of AHP as a tool that helps softare developers rationalize among several design implementations to select the optimal one. Keyords: design quality, design goal, analytic hierarchy process, AHP, QMOOD
. Introduction In this study, e demonstrate choosing the optimal object-oriented implementation. The interesting case study is implementation ith / ithout softare design patterns for the same requirement because in recent years, softare design patterns are popular solution and have been influencing in softare design engineering. Several researchers [] often mention that they can speed up the development process and improve design quality as ell. Hence, softare design patterns are alays applied to softare design by softare designers. In fact, softare design patterns are not silver bullet; some research report softare design pattern should be used ith caution because they do not alays improve the quality (see, e.g [],[8] and point out eakness and strength of each softare design pattern [7]. These eakness and strength are used as criterion to indicate hy e can use AHP to source code selection. In this paper, e propose an approach for choosing the optimal object-oriented implementation using AHP. First of all, e briefly explain about related background used in our approach. Section e propose our approach for choosing. Section e sho a case study evaluated and chosen by our approach. Section e describe the results. Finally e conclude hy AHP is effective enough to choosing the optimal object-oriented implementation by one-ay ANOVA and multiple comparison results, introduce future ork.. Background. The Analytical Hierarchy Process [] The analytical hierarchy process (AHP is a pair-ise comparison method developed by Saaty in 970. The AHP model is carried out in stages as follos: Structuring complexity or decomposition into a hierarchy (see Figure. Measuring on a ration scale or comparative judgments. In pair-ise comparison, to elements of the same level are compared and ratio of relative importance is assigned to each ( n n paired comparison in A = a ij here, n be a number of criteria. Saaty provided for a linear nine point scale for each paired comparison (see Table. Synthesizing these judgments to yield a set of overall priorities for the hierarchy. heck the consistency ratio from R = I / RI. In this case n >=, R have to equal to or less than 0.. Further, e ill use AHP in eighed manner for our approach. Figure An AHP hierarchy Table The scale for pare-ise comparisons The Scale for Pare-ise omparisons Weight Definition Equal importance Equal to moderate importance Moderate importance Moderate to Strong importance Strong importance Strong to very strong importance 7 Very strong importance 8 Very strong to extreme importance 9 Extreme importance.,.,., etc. can be used for element that are very close in importance
. Quality Model of Object Oriented Design Bansiya et al. [] extended the Dromey s quality model to propose a hierarchical model for evaluate object-oriented softare design quality, called QMOOD. It evaluates object-oriented softare design quality by using source code metrics. As in figure, represents a ay to mapping source code metrics to design quality attributes in abstraction level; there compose of levels and relationships beteen these levels. Functionality,Effectiveness, Understandability, Extendibility, Flexibility and Reusability are design quality attributes in the QMOOD first level. These design quality attributes are our design goals or quality factors too. In second level, represents the object-oriented design properties hich affect the quality attributes. In the third level, represents design metrics hich evaluate the design properties in second level. In fourth level, represents design components such as methods, classes, packages and so on. L L L L L L L Figure Levels and relationships [] Figure An approach for choosing the optimal object-oriented implementation using analytic hierarchy process (AHP
. hoosing the Optimal Object- Oriented Implementation using Analytic Hierarchy Process From data synthesizing, e can determine an approach for choosing the optimal object-oriented implementation using analytic hierarchy process as figure shos overall processes.. ase study In this section, e present our case study evaluated and chosen by using our approach. In this section, e present our case study evaluated and chosen by using our approach. It composes of minor case studies as follos: First and Second case study consists of sets of source code from the same requirement: one hich included State softare design pattern and another one ithout. Third and fourth study consists of sets of source code from the same requirement: one hich included Iterator softare design pattern and another one ithout. Hence, a total our case study composes of 8 sets of source code from requirements. We ill demonstrate ho to evaluate and choose the optimal source codes for only first case study by using our approach as figure. First of all, e specify design quality attributes in QMOOD first level as our design goals or quality factors. Namely, they are Functionality (, Effectiveness (, Understandability (, Extendibility (, Flexibility (, and Reusability (. Then e use Metrics.. [] is an open source plug-in for the Eclipse to measure set of source code but metrics in Metrics.. are not equivalent to the metrics QMOOD proposed; therefore, e use set of metrics hich replaced by Andreas Jetter[] for compute quality indices of each our design goals from QMOOD equation[]. The results presented in table. Then e assign eight or priority to these six our design goals by compare among A = design goals important into matrix ( a ij by using fundamental scale hich consists of,,, 7 and 9 for pair-ise comparisons as table. In this case, the value of consistency ratio (R is 0.09 hich is less than 0., so indicating an acceptable judgment. In table shos the eight values assigned to our design goals. These eight values are used to calculate the quality indices for comparison of each complementation. Table The quality index of design goals. Quality index of design goals Functionality ( Effectiveness ( Understandability( Extendibility( Flexibility ( Reusability ( ithout softare design pattern ith State softare design pattern q..8 q 0.8 0. q -.8 -.7 q 0 0 q 0.7 q.. Table omparison matrix 0. 9 0. 9 9 9 9 9 9 0. 9 0. 9 0. 0. 0. 0. 0. * R = 0.09 Next step, e compute quality indices of each implementation as a single variable by folloing formula Q = i i q = i ( Where Q be quality index of object-oriented implementation. q i be quality index of design goal i. be eight of design goal i. i
Table Weight values assigned to our design goals Design goal Weight Functionality ( 0.09 Effectiveness ( 0.09 Understandability ( 0.98 Extendibility ( 0.09 Flexibility ( 0.09 Reusability ( 0.0 So, e can calculate quality index of objectoriented implementation ith State softare design pattern ( Q ith _ SDP is -. and ithout ( Q ithout _ SDP is -.. Finally, e select optimal implementation base on our design goal eights by compare quality indices. From above quality indices e should select implement ithout State softare design pattern because it has more quality than another one. Then e use our approach to total case studies from quality indices as in table, and ork together ith 9,09 sets of eight that is consistent in Saaty s sense ( R 0.. Table The quality index of design goals. sc rd th W/O W W/O W W/O W q 0.88.9.09.09 0.88. q 0. 0. 0.7 0.8 0. 0. q - - - - - -..0.9.9.8.8 q 0 0.07 0 0. -0. -0. q 0. 0.08 0.88.07 0. 0. q..8.9.0.. W/O: ithout softare design patterns, W: ith softare design patterns. Data Analysis First of all, e represent a result analysis of data. Table represents compared quality indices ( Q results of minor case studies. The next step, e ill analyze sets eight of quality factors hich are the causes of Qith _ SDP Qithout _ SDP. We perform one-ay ANOVA statistical test (significance levelα = 0.0 to sho to these differences are statistically significant or not and compare of all the groups of eight ith the Tamhane method to sho ho differences. Table 7,eight of quality factors are used as the independent variable, revealed statistically significant differences beteen the groups of eight (p= 0.000. In order to locate the difference beteen six groups of eight, a post hoc test runs. The result of this test indicates in table 8 distinctly indicate that is more than,,, and ith statistically significant Table 9, eight of quality factors are used as the independent variable, revealed statistically significant differences beteen the groups of eight (p= 0.000. In order to locate the difference beteen six groups of eight, a post hoc test runs. The result of this test indicates in table 0 distinctly indicate that: - is more than,,, and ith statistically significant. - is more than,, and ith statistically significant. - is less than ith statistically significant. - is less than,,, and ith statistically significant.
ase study Table Results Q ith _ SDP > Q ithout _ SDP Q ith _ SDP <= Q ithout _ SDP,8 (7%,88 (% 7,9 (98%, (% 9,7 (8% 9,7 (% 7,9 (98%, (% Table 7 One-ay ANOVA result from and minor case studies Sum of Squares df Mean Square F Sig. Beteen Groups 0.0.0 8.08.000 Within Groups.7 9.E-0 Total.9 00 * Significance levelα = 0.0 Table 8 Multiple comparison result ith Tamhane from and minor case studies - -9.E-0 -.8*.80E-0.7E-0.E-0 - -.7*.7E-0.7E-0.7E-0 -.9*.880*.87* - -.E-0 -.E-0 - -.0E-0 - * Significance levelα = 0.0 Table 9 One-ay ANOVA result from and minor case studies Sum of Squares df Mean Square F Sig. Beteen Groups 0.08.0.7.000 Within Groups.7 9.77E-0 Total.80 00 * Significance levelα = 0.0 Table 0 Multiple comparison result ith Tamhane from and minor case studies - -.E-0 -.* -7.7E-0 -.*.8E-0* - -.* -7.E-0 -.*.E-0* -.*.89*.9* - -.*.E-0* -.0* - * Significance levelα = 0.0
. onclusions In this section e briefly summarize results in previous section that clearly sho hy AHP is effective enough to choosing the optimal object-oriented implementation. The result in table accords ith hat Khashayar Khosravi and Yann-Gael Gueheneue conclusion; they report that understandability ( is eakness of State softare design patter in their research [7]. The result in table 8 accords ith hat Khashayar Khosravi and Yann-GaelGueheneue conclusion, they report that understandability ( is eakness of Iterator softare design pattern, expandability and simplicity hich are both sub factor of flexibility ( and reusability ( are strength of Iterator softare design pattern in their research [7]. The above results indicate that AHP is effective enough to choosing the optimal object-oriented implementation because it can sho influence of eakness and strength of design patterns quality factor eight on quality indices. The results sho that you should select implementation ithout design patterns henever you see their eakness as important and disregard their strength. In the future, e invent softare design patterns decision making tool that support in early softare development process (design phase by using AHP as ell as diagram metrics. 7. Acknoledgement I ould like to thank Dr.honalemeth Arpnikananondt ho gives perfect suggestion, checks this paper ith carefully and encourages me all the time. References [] Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (99. Design Patterns: Elements of Reusable Object-Oriented Softare. Massachusetts: Addison-Wesley Publishing. Positively?. th European onference on Softare Maintenance and Reengineering,SMR 008, Washington, D, USA [] Bhushan, N., &Rai K. (00. Strategic Decision Making: Applying the Analytic Hierarchy Process. London: Springer-Verlag. [] Bansiya, J., &Davis,.G. (00. A Hierarchical Model for Object-Oriented Design Quality Assessment. IEEE Transaction on Softare Engineering, 8(, -7. [] Metrics... (n.d.. Available at August, 009 at http://metrics.sourceforge.net/ [] Jetter, A. (00. Assessing Softare Quality Attributes ith Source ode Metrics. Diploma Thesis. University of Zurich, Birmensdort, Sitzerland. [7] Khosravi, K., &Gueheneuc, Y.G., A Quality Model for Design Patterns. (00. Retrieved August 0, 009, from http://.yanngael.gueheneuc.net/work/~tu toring/documents/00+kashayar+khosravi +Technical+Report.doc.pdf. [8] Reißing R., (00. Impact of Pattern Use on Design Quality. The OOPSLA 00 orkshop Beyond Design: Patterns (misused, Tampa, Florida USA. [9] Hsueh, L.-N., hu, H.-P., &hu W., (008. A quantitative approach for evaluating the quality of design patterns. The Journal of Systems and Softare. 8(8, 0-9. [] Khomh, F., &Gueheneuc, Y.G. (008. Do Design Patterns Impact Softare Quality