logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    sfolax6776
    Mar 21, 2020
      ·  Edited: Oct 01, 2021

    1-12 Lab 2: the Point class and the Rectangle class

    in AP Computer Science A

    A. Create a class Point, which has two double instance variables for x and y coordinates. Create two constructors and all setters and getters as usual.

    B. Create a class Rectangle, which can be specified with the upper left corner as a point, plus length, and width. Create three instance methods: public double area(), public double perimeter(), and public boolean greaterThan(Rectangle r). A rectangle a is greater than b if and only if a has a greater perimeter and area than b.

    C. Answer the questions below.


    1 comment
    0
    joycexinxu
    Oct 07, 2021

    replit.com
    Homework
    A Java repl by meteacher

    0
    1 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners