Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a class called Circle that holds information about a Circle. Your Circle

ID: 3842356 • Letter: C

Question

Create a class called Circle that holds information about a Circle. Your Circle class really only needs one property, the radius. Properties are the values that makeup the data section of the class. This class should be created in a file called Circle.py. There should be no other functionality in this file except the code for the Circle class. Your class should have the following functionality: __init__ - Should set the diameter and area of the Circle Functions Mutators: setRadius - Used to set the radius of the class Accessors area - produces the area of your Circle. This can be calculated use PI * Radius squared diameter - produces the diameter of your Circle. Can be calculated as twice the radius circumference - Produces the circumference of your Circle. This can be computed using PI * diameter __str__ - Should return a string representation of the circumference. NOTE: All functions of the class should operate on the data section of the class in some way. If you have written functions that do not then you should rethink your solution. In addition you should strive to create one code path. This means you should eliminate duplicate code whenever possible. GUI: You are required to create simple TKinter GUI interface. I will leave the design of this interface to you but it should have a button that will gather input and produce some output. You are required to show the creation of at least three instances of the Circle class. Your GUI interface should be in a separate file then Circle.py.

Explanation / Answer

import copy from Point1 import Point, Rectangle, print_point from Point1_soln import distance_between_points class Circle: """Represents a circle. Attributes: center, radius """ def point_in_circle(point, circle): """Checks whether a point lies inside a circle (or on the boundary). point: Point object circle: Circle object """ d = distance_between_points(point, circle.center) print(d) return d
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote