Homework #6 – CSC110AB (Java) Basics of classes Due: Friday, April 29 (at midnight) Points: 25 (+5 Extra Credit) Requirements: 1. As per usual, be sure to leave some comments (in your code)

Homework #6 – CSC110AB (Java)Basics of classesDue: Friday, April 29 (at midnight)Points: 25 (+5 Extra Credit)Requirements:1. As per usual, be sure to leave some comments (in your code) on how certain complex / unique parts of your program work.2. Be sure to follow the instructions outlined [below] for each class / function EXACTLY as described. This includes small things such as making sure your methods are defined with the right names, using the appropriate / necessary data type for your parameter(s) / return type, etc.3. Your final solution should NOT have any print statements anywhere in either file. You can of course utilize print statements to test your code / numbers as your developing this program, just be sure to delete them once you’re done. Also, what you have (or don’t have) in your main method will NOT affect your grade since all I care about are your [two] classes.Tips:1. Be sure to complete “step 1” before moving on to “step 2”; as the class described in step 2 is dependent on the class made during step 1.2. You may notice that the formulas for the “intersect()” functions share a common aspect, so I recommend creating a function to deal with that portion of the needed calculation. Maybe make it a static function in class ‘Point’ which works with two ‘Point’ parameters. Think about it.3. If you’re unsure about a particular aspect the I didn’t go over or purposely left vague for you to figure out on your own, yet you can’t, feel free to contact me with your questions.4. Be sure to test your classes function-by-function as you’re developing your program and NOT all at once at the end.STEP 1: Create a class called ‘Point’ with the following specifications.NOTE: Nothing within this class should be private. Also these should NOT be static.Attributes: A double variable called “X” A double variable called “Y”Constructors: A default constructor which will initialize the ‘X’ and ‘Y’ fields with zero. A “Point(double, double);” constructor that’ll assign the parameters’ values into the ‘X’ and ‘Y’ fieldso { 1st parameter => X & 2nd parameter => Y }————————————————————————————————————STEP 2: Create a class called ‘Circle’ with the following specifications.NOTE: Nothing within this class should be private. Also these should NOT be static.Attributes: A double variable called “radius” A Point object called “center” o HINT: (refer back to lecture on Aggregation)Constructors: A default constructor which will initialize the ‘radius’ field with zero.o NOTE: Make sure that ‘center’ is initialized with a “(0, 0) point” here. A “Circle(double);” constructor that’ll assign the parameter’s value into the ‘radius’ field.o REQUIREMENT: You MUST invoke the class’ own mutator method to handle this assignment.o NOTE: Make sure that ‘center’ is initialized with a “(0, 0) point” here. A “Circle(Point, double);” that’ll assign the parameters into their respective fields.o REQUIREMENT: You MUST invoke the class’ own mutator method to handle the assignment operation for ‘radius’. Methods: A mutator function, for attribute ‘radius’, called “setRadius”.o REQUIREMENT: Make sure that if the parameter’s value is negative, then the assigned value should be zero instead. A function, with NO parameters, called “getArea” which (as the name implies) will calculate and return what the area of our Circle is. Formula: (PI * R ^ 2)o NOTE: You can simply use the value of 3.14159 for ‘PI’. A function, with NO parameters, called “getCircumference” which (as the name implies) will calculate and return what the perimeter of our Circle is. Formula: (2 * PI * R)o NOTE: You can simply use the value of 3.14159 for ‘PI’. A function called “intersect” with a ‘Point’ parameter which will return true if the argument lies within the Circle’s area (including the edge), otherwise it’ll return false.o TIP: The easiest way to figure this out is to compare the lengths of the radius and the distance between the two Points. If you don’t know how to calculate a square root, here’s an alternate formula you can use: (p2.Y − p1.Y)2 + (p2.X − p1.X)2 ≤ radius2 EXTRA CREDIT: An overloaded “intersect” function with a ‘Circle’ parameter which will return true if the argument intersects with this Circle object (including the edge), otherwise it’ll return false.o TIP: The easiest way to figure this out is to compare the lengths of the sum of the radii and the distance between the two center Points. If you don’t know how to calculate a square root, here’s an alternate formula: (p2.Y − p1.Y)2 + (p2.X − p1.X)2 ≤ (radius_A + radius_B)

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!