Draw the uml diagram for the class

Assignment Help Software Engineering
Reference no: EM13755266

For this task you have to define a class Circle2D to represent a circle with a point in two dimensions labeled x and y and a radius. To test Circle2D class you also need to define a test class. The Circle2D class has the following state and functionality:

Two double data fields named x and y that specify the centre of the circle with getter methods.

A data field radius with a getter method

A no-arg constructor that creates a default circle with (0, 0) for (x, y) and 3 for radius.

A constructor that constructs a circle with the specified x, y, and radius.

A method getArea() that returns the area of the circle

A method getPerimeter() that returns the perimeter of the circle

A method contains(double x, double y) that returns true if the specified point (x, y) is inside this circle

A method overlaps(Circle2D circle) that returns true if the specified circle overlaps with this circle.

Draw the UML diagram for the class and then implement the class. Write a test class program that creates a Circle2D object c1(new Circle2D(2, 2, 2.5)), display its areas and perimeter, and display the result of c1.contain(3,3), c1.containes(new Circle2D(4, 5, 8.5)), and c1.overlaps(new Circle2D(3, 5, 0.3)).

Reference no: EM13755266

Questions Cloud

Assessment of each mncs overall approach : The analysis should provide an assessment of each MNCs overall approach to working in the selected country as well as recommendations for how they could improve their performance. The illustration of hypothesis and the connections with South Africa..
Create an entire sdlc process : Planning Phase: Create an entire SDLC process that will bring added value to a business. Identify the project-what is it supposed to do
Why do recessions occur every 5-10 years : Why do recessions occur every 5-10 years?
Interest income reported in the year the bond matures : At the beginning of his current tax year, Eric bought a corporate bond with a maturity value of $36,000 from the secondary market for $29,100. The bond has a stated annual interest rate of 4 percent payable on June 30 and December 31, and it matures ..
Draw the uml diagram for the class : Draw the UML diagram for the class and then implement the class. Write a test class program that creates a Circle2D object c1(new Circle2D(2, 2, 2.5))
Who was charlemagne revolting against : Who was Charlemagne revolting against? Why was Charlemagne's rule so pivitol for Western Europe? What were some of King Louis's mistakes?
Pace of economic growth : A developing country wants to become more global, hoping to increase the pace of its economic growth and improve the quality of life for its people. It wants to achieve this by attracting foreign direct investment.
Gavin products uses a perpetual inventory system : Gavin Products uses a perpetual inventory system. For 2012 and 2013, For each year, compute cost of goods sold, the cost of ending inventory, and gross margin using FIFO.
Draw a state transition diagram for garage door system : Draw a state transition diagram for garage door system - Design a PLC program using ladder logic that has two input and three outputs.

Reviews

Write a Review

Software Engineering Questions & Answers

  Designing flowchart for wholesale company

Design a flowchart to depict each situation. An individual from a wholesale company needs to prepare five copies of sales.

  Case study on gem infosys

The organization uses a firewall, three file servers, two Web servers, one Windows 2008 Active Directory server for user access and authentication, ten PCs, and a broadband connection to the Internet.

  Provide english description for the regular expressions

Provide English description for the regular expressions listed below.

  What might be your key decision rules

You are a manager in a company that has a lot of in-house IS expertise. What might be your key decision rules for when to purchase a system versus when to develop it in-house?

  The term regression was originally used in 1885 by sir

the term regression was originally used in 1885 by sir francis galton in his analysis of the relationship between the

  Prepare a crows foot erd

Prepare a Crows Foot ERD using a specialization hierarchy if appropriate.

  Business requirements

Describe the scope and analyze how to control the scope. Speculate and give justifications for how to control scope. Identify possible risks, constraints, and assumptions.

  Revamp the newsletter tutorial

Using the finished tutorial as a template, consider how the pages hold style continuity within a particular grid system (as explained in class) and improve upon it. Use the tutorial newsletter as a template but use your own images and headlines to..

  Create an outline for the followingdevelop a health

create an outline for the followingdevelop a health organization disaster planning and response strategy that links

  Describe the concept of encryption

Describe the concept of encryption., Include a discussion about symmetric and asymmetric encryption., Provide a description of at least 2 different encryption algorithms.

  Element of array

Discuss how do you access the element of array a located at row two and column four?

  Describe a modification to the random port scan

Describe a modification to the random port scan, as describe in previous exercise, so that it still use a randomly generated sequence of port numbers but will now have exactly the same number of attempted TCP connections as a sequential port scan.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd