Systemadministratordealswithmanyproblems,ascomputingenvironmentbecomesincreasinglycomplex.Systemswithanabilitytorecognizesystemstatesandadapttoresolvetheseproblemsofferasolution.Muchexperienceandknowledgearerequiredtobuildaself-adaptivesystem.Self-adaptivesystemshaveinherentdifficulties.Thispaperproposesatechniquethatautomaticallygeneratesthecodefortheself-adaptivesystem.Thusthesystemiseasiertobuild.Self-adaptivesystemsofpreviousresearchrequiredhighsystemresourceusage.Incorrectoperationcouldbeinvokedbyexternalfactorssuchasviruses.Weproposeanimprovedself-adaptivesystemapproachandapplyittovideoconferencesystemandrobotsystem.Wecomparedthelinesofcode,thenumberofclassescreatedbythedevelopers.Wehaveconfirmedthisenhancedapproachtobeeffectiveinreducingthesedevelopmentmetrics.