( --> )

Task 3

The Task

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.

Visualization

The Java Instruction

b = p.degree() == 8;