Practice Reading Signatures

Read the following signatures and write a valid method call to each. Include all necessary declarations. If you need to call a constructor, call the default. Explain what you think each method does.

Note: These classes and methods may not exist - you can answer the questions just by reading the signatures.

  Class the Method Belongs to Signature
1. Monster Monster(String type, String name, double weight)
2. Monster public void eat(Rectangle r, int num)
3. Line public void paint(Graphics g)   // as if you were calling it from an Applet's paint() method
4. Line Line(Point p1, Point p2)
5. Line Line(int x1, int y1, int x2, int y2)
6. ATM public Receipt getMoney(double amount, String PIN)
7. JellyFish public void swim(double speed)
8. your application called TaxForm public static double refund(int year)   // as if you were calling it from your main() method