Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

In our lab instructions, in Section C we are told that the grouping feature allows for multiple features to be treated as a single figure after being selected. However, the number of squares from countSquares remain the same for me even after group multiple squares into one. Is this supposed to happen and each square is supposed to be counted as itself even after being grouped or are we supposed to change another method to execute this?

asked in CSC 305 Fall 2024 by (810 points)

1 Answer

+4 votes
 
Best answer

You shouldn't need to change much in the way of functionality.

You are refactoring, so you want the same functionality before and after your changes, you just want better / more elegant code.

In both cases, squares that are part of "grouped figures" should be counted.

answered by (3.2k points)
selected by
...