Pixel Density Class


SUBMITTED BY: Guest

DATE: Jan. 15, 2014, 2:51 p.m.

FORMAT: C++

SIZE: 634 Bytes

HITS: 1140

  1. class densitate_pixeli{
  2. public:
  3. virtual int densitate()=0;
  4. };
  5. class display:public densitate_pixeli{
  6. private:
  7. float latime;
  8. float inaltime;
  9. float diagonala;
  10. public:
  11. float get_latime(){
  12. return latime;
  13. }
  14. float get_inaltime(){
  15. return inaltime;
  16. }
  17. int get_diagonala(){
  18. return diagonala;
  19. }
  20. void set_latime(float val){
  21. latime=val;
  22. }
  23. void set_inaltime(float val){
  24. inaltime=val;
  25. }
  26. void set_diagonala(float val){
  27. diagonala=val;
  28. }
  29. virtual int densitate(){
  30. return sqrt(latime*latime+inaltime*inaltime)/diagonala;
  31. }
  32. };

comments powered by Disqus