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

  Finding whether two machines are equivalent

Consider the problem of finding whether two of these machines are equivalent. Formulate this problem as the language, and illustrate that it is undecidable.

  Value of variable immediately before that process terminates

Suppose all fork calls are successful. Inside node for each process, illustrate value of variable x immediately before that process terminates.

  Explaining use of information technologies to act ethically

When it comes to use of information technologies, it is frequently difficult to find out how to act ethically. Consider some of your own use of information technologies.

  Determine the size of data register

If the computer in this exercise uses the same size word for data and instructions determine the size of each data register? What is the size of the instruction register.

  Policies and provisions to unbundled network elements

What are some of the major policies and provisions under the 1996 Act in regards to unbundled network elements (UNEs).

  Formulate problem as linear programming problem

Formulate the following problem as a linear programming problem and then solve the problem by Excel only. Only the Excel file which shows the problem has been solved by Solver.

  Which vulnerability be evaluated for extra controls first

If organization has three information assets to evaluate for risk management as shown in accompanying data, which vulnerability must be evaluated for additional controls first? Which one must be evaluated last?

  How prototyping influences user centered design

Explain prototyping advantages and disadvantages of prototyping, how prototyping influences user centered design, presents critical review of two to three prototyping applications,

  Address three components represented in cell

Assume that a security model is needed for protection of information in your class. Write a brief statement on how you would address the three components represented in that cell.

  Assigning value to last array of array list

Write a statement that assigns the value 160000 to the last element of the ArrayList salaryStep.

  Explaining resulting scheme is not ind-cpa-secure

Let a variant of CBC-mode encryption where sender simply increments the IV by 1 each time a message is encrypted. Illustrate that resulting scheme is not IND-CPA-secure.

  Current design model of it

In the current design model of IT service provision at NSI, the service desk function is provided in-house by TAFE employees. Consider the option of outsourcing the service desk.

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