1 of 5

October 25

1) Draw the class diagram showing the relationship between Polygon and Rectangle.

2 of 5

October 25

2) For each code snippet below:

Can the code snippet be run without error? Why or why not?

a) Polygon p1 = new Polygon(3.0, 4.0, 5.0);

b) Polygon p2 = new Rectangle(3.0, 5.0);

c) Rectangle r1 = new Polygon(3.0, 4.0);

d) Rectangle r2 = new Rectangle (3, 4, 5);

Interfaces FRQ test this Friday

3 of 5

Introducing Langton’s Ant project

Langton’s Ant Simulation:

You can add another ant friend!

https://josephpetitti.com/ant

4 of 5

NumberGroup Interface

Complete the FRQ in your small groups. Once done, implement in Replit.

5 of 5

Homework

  • Complete NumberGroup FRQ in IN. Then submit image/pdf of written work.
  • Complete NumberGroup Replit