Formula gives the distance between two points (

Assignment Help Basic Computer Science
Reference no: EM13163380

formula gives the distance between two points (x1, y1) and (x2, y2) in the Cartesian plane:

(x2-x1)^2 + (y2-y1)^2

Given the center and a point on a circle, you can use this formula to find the radius of a circle. Write a program that prompts the user to enter the center and a point on the circle. The program should then output the circle's radius, diameter, circumference, and area. Your program must have at least the following methods:

a. distance: This method takes as its parameters four numbers that represent two points in the plane and returns the distance between them.
b. Radius: This method takes as its parameter four numbers that represent the center and a point on the circle, calls the method distance to find the radius of the circle, and returns the circle's radius.
c. Circumference: This method takes as its parameter a number that represents the radius of the circle and returns the circle's circumference. (if r is the radius, the circumference is 2(Pi)r.)
d. Area: This method takes as its parameter a number that represents the radius of the circle and returns the circle's area. (If r is the radius, the area is (Pi)r^2.)
Assume that Pi =3.1416 

Reference no: EM13163380

Questions Cloud

Revaluation and de-recognition of depreciable assets : Prepare journal entries to record the revaluation on 1 July 2013 and the subsequent sale on 1 July 2014 and revaluation and de-recognition of depreciable assets
Program that counts the number of occurrences of lowercase : Write a program that counts the number of occurrences of lowercase and uppercase vowels in entered lines of text. Use a two-dimensional array to store the vowel counts. The array's first column holds the counts for the lowercase vowels, and the secon..
Random string of 100,000 characters is written : A random string of 100,000 characters is written down, where each character is independently, equally likely to be any of the upper-case letters A through Z in English.
Determine the mass of aluminum acetate : Determine the mass of aluminum acetate that can be made if you do the reaction with 125 grams of acetic acid and 275 grams of aluminum hydroxide.
Formula gives the distance between two points ( : formula gives the distance between two points (x1, y1) and (x2, y2) in the Cartesian plane:
Which one of these compounds should be soluble in water : Based on the solubility rules, which one of these compounds should be soluble in water?
Jobs can be scheduled partially : Assume that jobs can be scheduled partially, so that a job of value Vi which requires time Ti will receive value, x Vi , if processed only for time, t = x Ti, for a fraction, 0
How many coulombs are required : How many coulombs are required?
State zinc amalgam and hcl affords an optically active : Treatment of A with zinc amalgam and HCl affords an optically active, dextrorotatory hydrocarbon C. Identify compounds A, B, and C, including stereochemical configurations. Be sure to explicitly draw H and both wedge/dash bonds at any configuratio..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain findings after conducting search for .cde files

You work for mid-sized corporation known for its inventions which does a lot of copyright and patent work. Explain your findings after conducting Internet search for .cde files.

  Freedom of expression in cyberspace-information society

Write down a 3 pages summary about "Freedom of expression in Cyberspace & Information Society " after reading at least one article in each point of view.

  Create confidence interval for proportion of all welders

Create the 95 percent confidence interval for proportion of all welders who graduated from registered welding course.

  Write the definition of function dashedline

Write down the definition of a function dashedLine, with one parameter, an int. If parameter is negative or zero, function does nothing. Otherwise it prints complete line terminated by new line character to standard output consisting of dashes

  Process computer uses to convert data into information

Write down a 200 word paper which explains the distinctions of data and information and in short describe the process a computer uses to convert data into information.

  Explain physical condition for alarm in logic truth table

Write truth table in the order of T P F L. Make sure to recognize corect physical condition for alarm in the logic truth table.

  Advantage and disadvantage of using word to work in graphics

Identify the advantages and disadvantages of using Word to work with graphics, tables, and special formatting functionality. Provide specific examples.

  Expert systems created-deployed in real-world applications

Expert systems have been created and deployed in many real-world applications to support decision making. Discover one recent case study or academic journal article.

  Explain computer etiquette for effective communication

Each day we should be careful to insure that personal information is not compromised. Computer etiquette is difficult for effective communication.

  Calculate overall cost including installation-configuration

Calculate the overall cost, including installation, configuration, maintenance, ISP, and miscellaneous costs. Do not consider depreciation in the cost computation.

  Compute the cost of sorting the relation in seconds

Suppose a flash storage device is used instead of disk, and it has a seek time of 1 microsecond and a transfer rate of 40 MB per second. Recompute the cost of sorting the relation in seconds with.

  Web service management

How is Web service management different from conventional distributed computing  systems management?

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