Context-aware systems play a vital role in facilitating our daily life activities. The development of context-aware systems is an inherently complex task. These systems adapt to context change and provide a composed service to satisfy user requests. This paper aims to provide a complete sketch of a context-aware system. To illustrate the working of the proposed system, we consider a context-aware e-learning application that provides different types of study material according to the context. When context changes, a new plan is obtained to satisfy the user request. We implement and evaluate the context-aware e-learning system with the different phases of the proposed system. The experimental results show the efficacy of the approach.