Create a class Shape which performs the following. a. Provide a method areaCircle which takes one...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a class Shape which performs the following. a. Provide a method areaCircle which takes one parameter radius as double, calculates 03 Marks and returns the area of the circle as double. [Formula: Area=Tr] b. Provide a method circumCircle which takes one parameter radius as double, calculates and returns the circumference of the circle as double. [Formula: 03 Marks Circumference=2Tr] c. Provide a method sphereSurfaceArea which takes one parameter radius as double, calculates and returns the surface area of the sphere as double. [Formula: Surface 03 Marks Area=4r] d. Provide a method sphereVolume which takes one parameter radius as double, calculates and returns the volume of the sphere as double. [Formula: 03 Marks Volume=4/3Tr] Create a class Shape which performs the following. a. Provide a method areaCircle which takes one parameter radius as double, calculates 03 Marks and returns the area of the circle as double. [Formula: Area=Tr] b. Provide a method circumCircle which takes one parameter radius as double, calculates and returns the circumference of the circle as double. [Formula: 03 Marks Circumference=2Tr] c. Provide a method sphereSurfaceArea which takes one parameter radius as double, calculates and returns the surface area of the sphere as double. [Formula: Surface 03 Marks Area=4r] d. Provide a method sphereVolume which takes one parameter radius as double, calculates and returns the volume of the sphere as double. [Formula: 03 Marks Volume=4/3Tr]
Expert Answer:
Answer rating: 100% (QA)
public class Shape Constant for pi private static final double PI 314159 M... View the full answer
Related Book For
Guide To Java A Concise Introduction To Programming
ISBN: 978-3031228414
2nd Edition
Authors: James T. Streib, Takako Soma
Posted Date:
Students also viewed these programming questions
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
Implement a class Rectangle which represents a rectangle shape as described below: A. The Rectangle class has one private class constant DEFAULT_VALUE that should be initialized to 0.0 . B. The...
-
Shemekia applied to a college that uses multiple regression to select students. This college only considers students whose predicted firstyear GPA is 3.0 or higher. Shemekias predicted GPA was 2.9...
-
You want to borrow $89,000 from your local bank to buy a new sailboat. You can afford to make monthly payments of $1,850, but no more. Assuming monthly compounding, what is the highest rate you can...
-
Santana Corporation has 400,000 shares of common stock outstanding throughout 2010. In addition, the corporation has 5,000, 20-year, 7% bonds issued at par in 2008. Each $1,000 bond is convertible...
-
The \(P\)-value on page 476 was calculated using the \(R\) software command ks.test(x, "punif", 0,30 , alternative \(=\) "t") The following are 15 measurements of the boiling point of a silicon...
-
Ampco is a manufacturing company that has a contract to supply a customer with parts from April through September. However, Ampco does not have enough storage space to store the parts during this...
-
The Samsung Global Code of Conduct and Business Conduct Guidelines, which direct every one of their representatives, drive their efforts to deliberately oversee consistency and moral dangers. It also...
-
Sharon wanted a video camera so she could record her son's soccer games and birthday parties. Reliable TV, a retailer, sold a digital video recorder to Sharon. The recorder has a one year warranty....
-
Use the fund fact sheets provided by the respective asset management companies (attached) for the following mutual funds to answer questions 1-6: TD Monthly Income Fund (TDB622) (I) Investor's...
-
You observed the forward price in the market is 28000 for a contract with 1 year to maturity. The 1-year risk-free interest rate is 0.2% p.a., continuously compounded. The dividend yield is still...
-
Based only on the material found in our textbook, please answer the following questions: (1) Describe and discuss the performance evaluation process. (2) What is standard deviation, the Sharpe ratio,...
-
Part 1 - Forms and Validation 1. In this assignment, you will create a new JavaScript file to include all of the existing validation routines. After creating the file, validation service.js, move the...
-
1. A binary search of a sorted array with 3 unique elements where the search is always successful can be viewed as an array with each element having a probability of being selected = 1/3 and the...
-
WWF Promotion Inc., is a large company staging musical shows, ballets, operas, wrestling and boxing matches and other events for the public. It has been operating in several international cities...
-
Burberrys competitive advantage is through its differentiation strategy. What risk should Burberry remain aware of?
-
Write both serial code and parallel code to perform vector addition. Plot execution times of several runs with a different number of threads and to see the speed up.
-
Suppose that two different types of sources are used in a term paper: books and journal articles. The following UML diagram illustrates how the sources are organized. First, implement the three...
-
Suppose the Vehicle class is defined to keep track of vehicles in a household. What kinds of instance data members, variables and constants, would be defined for such Vehicle objects? Do any useful...
-
LDDS continued to publicly report increasing profits and sales in the financial statements, which allowed it to acquire more companies with no limit to the growth of its stock price. True/False
-
LDDS suffered from high fixed costs coupled with a lack of technical knowledge and expertise in optimizing the configuration of circuits, which resulted in high line costs. True/False
-
WorldCom overstated its earnings by improper accounting for multiple element contracts. True/False
Study smarter with the SolutionInn App