Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Pixel Density Class
SUBMITTED BY:
Guest
DATE:
Jan. 15, 2014, 2:51 p.m.
FORMAT:
C++
SIZE:
634 Bytes
Raw
Download
Tweet
HITS:
1140
Go to comments
Report
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
;
}
};
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus