class densitate_pixeli{ public: virtual int densitate()=0; }; class display:public densitate_pixeli{ private: float latime; float inaltime; float diagonala; public: float get_latime(){ return latime; } float get_inaltime(){ return inaltime; } int get_diagonala(){ return diagonala; } void set_latime(float val){ latime=val; } void set_inaltime(float val){ inaltime=val; } void set_diagonala(float val){ diagonala=val; } virtual int densitate(){ return sqrt(latime*latime+inaltime*inaltime)/diagonala; } };