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. application called LinuxPermissions public static String permissionString(String perms) // as if you were calling it from main()
9. application called LinuxPermissions public static String oneString(String perms) // as if you were calling it from main()
10. LineArt public void paintHalfLines(Graphics g, int startX, int startY, int widthStep, int heightStep)
// as if you were calling it from the LineArt paintComponent() method