( --> )
Object Construction and Use (Problems)
Tasks
- Print the area of the given triangle or the
given rectangle, whichever is larger.
- Declare a variable named square and assign it
a square whose side equals the diagonal of the
given rectangle.
- Without using a selection statement, assign b
the boolean value true if the the polygon denoted
by p represents an octagon, and false if it
represents another kind of polygon.
- Display, unlabelled, assuring no subsequent
output on the line, the area of the pentagon
which inscribes the given circle.
- Imagine a six sided white die with black dots.
One side has one dot, another has two dots,
and so on. Suppose that s represents one
of the faces. Further, suppose that d represents
one of the dots. Declare a variable called
wsa and assign it the white surface
area of the six sided, many (count them in
your head) black dotted die.