A Rule-Based Expert System for Diagnosis of Heart Diseases