Calculate the area and circumference of a circle

Assignment Help JAVA Programming
Reference no: EM13694478

Question 1: Write a program to move and calculate the area and circumference of a circle.

The program should read from the screen the information of a circle, which contains:

1. the location of a circle indicated by three integers, i.e.
x- and y-coordinates of the center, and radius.

2. an integer indicating the moving distance in the horizontal direction.
Positive number means moving right, otherwise moving left.

3. an integer indicating the moving distance in the vertical direction.
Positive number means moving down, otherwise moving up.

For example, suppose we read the following 5 intergers from the screen:
20 10 40 9 -7
So the location of the center is (20, 10), and radius is 40. The circle should be moved 9 units to the right and 7 units up.

You are required to declare and define the subsequent "void" functions,

1. moveCircle function, which passes coordinates of the center by reference, and the moving distances on horizontal and vertical directions by value.

2. Calculate function, which passes the radius by value, and get back the area (PI*radius*radius) and circumference (2*PI*radius) of the circle through reference

Describe each and every question in depth with examples and prepare this application in java programming.

Reference no: EM13694478

Questions Cloud

Describe and assess impact of these devices on newspaper : Personal data assistants (PDAs), iPads, and e-Readers have the capability to wirelessly connect to online stores so that their users can purchase books, music, games,read e-Books, read the news, and perform a myriad of other tasks
Determine the security risks with respect to phishing : Mobile banking features have added several advantages for customers. Determine the security risks with respect to phishing, smishing, vishing, cloning, and a lost or stolen Smartphone that have been experienced by the financial services industry ..
Solve a single quadratic equation of the form : Write a C++ program to solve a single quadratic equation of the form - The actual solution of the equation shall be done by a function named equSolver(), which takes three coefficients as parameters and returns a structure of three fields: two root..
Use of universal quantification : Let L1, L2, ..., Ln be distinct lines in the Euclidean plane, and let A be the set of points formed by intersections of these lines. Characterize A using set notation and quantifiers.
Calculate the area and circumference of a circle : Write a program to move and calculate the area and circumference of a circle. - Calculate function, which passes the radius by value, and get back the area (PI*radius*radius) and circumference (2*PI*radius) of the circle through reference
Write a function named append that accepts three arguments : Write a function named append that accepts three arguments. The first two arguments passed to append are c-strings to be appended (the second c-string is appended to the first). The third argument passed should be the size of the character array ..
Program that computes the monthly loan payment : Write a program that computes the monthly loan payment, given the loan amount (a double value), the interest, as a percent % (a double value), and the number of years to repay the loan
Draw a diagram of how the stacks might look : Two stacks of positive integers are needed, both containing integers with values less than or equal to 1000. One stack contains even integers; the other contains odd integers.
Determine the successor to the throne of france : Define the predicate Successor(Year) giving the solution as the first successor to the crown for the year specified.

Reviews

Write a Review

JAVA Programming Questions & Answers

  What are some debugging techniques for javascript

What are some common programming errors? How can they be prevented? What is the try catch structure, how is it useful? What are some debugging techniques for JavaScript?

  Determine when the application should stop looping display

Write an application that reads a series of pairs of numbers as follows: 1) product number 2) quantity sold - Create an application in java

  Give at least one constructor without any parameter

We learned as popular Set implementation. Write own TreeSet class that implements following interface: You are to give at least one constructor without any parameter.

  Write a version of sumpairs

Write a version of sumPairs  that sums each component of the pairs separately, returning a pair consisting of the sum of the first components and the sum of the second components. So basically [(3,1)(10,3)] would return (13,4).

  Variable of type string that has been assigned

Assume that word is a variable of type string that has been assigned a value. Write an expression whose value is a string consisting of the last three characters of the value word. So if if the value if word were "biggest" the expression's value w..

  Artificial intelligence and computational linguistics

Artificial intelligence and computational linguistics - Andy Warhol Paintings - Write your answer to this problem on the next page, and feel free to tear out this page as a reference. Just for fim, here's the output of the method given as input a p..

  Morgellons disease is delusional

Why do some scientists say that Morgellons disease is delusional? When there have been fibers extracted from patients that cannot be identified? Isn't that physical proof that something is affecting these people physically?

  Write a script that prints out the full pathnames

Write a script that prints out the full pathnames of your files that are over a specified size.  The size should beread as a command line argument to the script.

  Your task in this assignment is to develop a graphical user

your task in this assignment is to develop a graphical user interface based java program that can communicate with a

  Utilizes a good design process

Analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array.

  Identify the first character of the name and lengthof length

Write a Java application that stores the names of your family and friends in a one-dimensional array of Strings. The program should show all names in upper case and lower case, identify the first character of the name, and the lengths of the names.

  Develop java package comprising of class using encapsulation

Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.

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