1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ExtremeBDS [4]
3 years ago
6

Design and implement a class called Sphere that contains instance data that represent the sphere’s diameter. Define the Sphere c

onstructor to accept and initialize the diameter, and include getter and setter methods for the diameter. Include methods that calculate and return the volume and surface area of the sphere (see Programming Project 3.5 for the formulas). Include a toString method that returns a one-line description of the sphere. Create a driver class called MultiSphere, whose main method instantiates and updates several Sphere objects.
Computers and Technology
1 answer:
Zolol [24]3 years ago
3 0

Answer:

Import java.awt.*;

import java.util.*;

public class Sprhere

{// Instance Data private double surfaceA, volume, r, diameter; //Constructors public Sphere ()

{r = 0;diameter = 0; surfaceA = 0;volume = 0;}

public Sphere (double radius, double d, double SA, double v)

{this. r = radius; this. diameter = d; this. surfaceA = SA;this.volume = v;}

//--------------------------------------------------------------------// Accesors.//--------------------------------------------------------------------public double get Radius()

{return r;}

public double get Diameter()

{return diameter;}

public double get SurfaceA()

{return surfaceA;}

public double get Volume()

{return volume;}

//--------------------------------------------------------------------// Mutators.//--------------------------------------------------------------------

You might be interested in
TECHNICAL TERMS: the adderess of a website
riadik2000 [5.3K]
Yes very interesting
6 0
2 years ago
Horizontal and vertical scaling usually refer to increasing the capacity of
salantis [7]

Answer:

I think servers and networks.

3 0
3 years ago
Choose the answer that best completes the
Fiesta28 [93]

Answer:

the information processing cycle

Explanation:

3 0
3 years ago
Read 2 more answers
What is one advantage of hard-disk recording?
NemiM [27]

Answer:

It allows for Non-linear editing

7 0
3 years ago
George enters the types of gases and the amount of gases emitted in two columns of an Excel sheet. Based on this data he creates
Alex777 [14]

Answer:

data source

Explanation:

The main aim of a data source is for the gathering of all necessary information that is needed to access a data. Since he has used the information to create a pie chart, this means that some data were used for the creation of this pie chart. Hence the information used for the creation of the pie chart is the data source for the information illustrated on the pie chart.

3 0
3 years ago
Other questions:
  • A ____ is a prewritten formula that is built into excel.
    6·1 answer
  • Whenever you are passing or another vehicle is passing you, _______ is particularly important to avoid collisions. A. Turning. B
    9·2 answers
  • To read visual and audio text means
    11·1 answer
  • Which of the following information would best be displayed throughout the use of a time line
    11·1 answer
  • As the network engineer, you are asked to design an IP subnet plan that calls for three subnets. The largest subnet needs a mini
    14·1 answer
  • The best way to achieve stronger encryption is to
    13·1 answer
  • Analyze the following code: class Test { public static void main(String[] args) { System.out.println(xMethod((double)5)); } publ
    7·1 answer
  • How does cryptocurrency exchange software works?
    14·1 answer
  • Cn someone help me plz
    11·1 answer
  • ARGENT !!20 POINTS <br> А ________ translates commands from a computer to draw lines on paper.
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!