[SOLVED] OOP Homework 1

25.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

-[2]Complete setX funciton
-[2]Complete getX function

-[2]write a default constructor that initializes all values to 0
-[2]Complete the all-argument constructor: Circle(Point2D c, double r)
-[2]write getter and setter methods for this class
-[2]Complete the intersect(Circle rhs) function that determines if this circle intersects with another circle rhs
-[2]Complete the contains(Circle rhs) function that determines if this circle contains another circle rhs
-[2]Complete contains(Point2D p) function that determines if this circle contains a point p
-[2]Complete perimeter() function that returns perimeter of the circle -[2]write a destructor that sets all values to 0

-[3]define two variables that specifies the rectangle in a 2d space the variables should represent: topright point, bottom-left point
-[2]write a default constructor that initializes all values to 0
-[3]write an all-argument constructor that accepts values of all member variables and set the members variables accordingly
-[2]write getter and setter methods for this class
-[2]Complete the area() function that returns area of the rectangle
-[3]Complete the intersect(Rectangle rhs) function that determines if this rectangle intersects with another rectangle rhs
-[3]Complete the contains(Rectangle rhs) function that determines if this rectangle contains another rectangle rhs
-[3]Complete inside(Circle c) function that determines if this rectangle is completely inside a circle c
-[2]Complete the perimeter() function that returns perimeter of the rectangle -[2]write a destructor that sets all values to 0

-Create suitable examples to demonstrate all functionalities as specified in the cpp file.

More practice: [For online]
-Extend your program to include facilities for other geometric objects such as square, triangle, ellipse, etc.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.