Question: Data structures Write an interface Measurements methods perimeter and area. Write two classes which use the interface: Rectangle properties length, width appropriate methods from interface

Data structures

  • Write an interface Measurements
    • methods perimeter and area.
  • Write two classes which use the interface:
    • Rectangle
      • properties length, width
      • appropriate methods from interface
    • Square (include Math.pow in your Square class)
      • property side
      • appropriate methods from interface
  • Write a driver(tester) class that
    • tests the methods in Square
    • tests the methods in Rectangle
    • includes a comment with Big-O complexity

If you google compute the area of square using square calc: find P, (or click the images to take you to the google search), you can find a nifty calculator

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!