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
An ftp ____ is a computer that allows users to upload and/or download files using ftp.
Brums [2.3K]
<span>An ftp server is a computer that allows users to upload and/or download files using ftp.</span>
7 0
3 years ago
U
beks73 [17]
8wmX si2 jkkajmid di e2 2i2
3 0
3 years ago
Why are duplicate tuples not allowed in a relation?
velikii [3]

Answer:

Explanation:

Duplicate tuples are not allowed in a relation because the specifications of the constraints of the regional integrity are violated, especially the main constraint that states that there can be no identical values for the attributes of two tuples at any database relation state.

Also, duplicate tuples are not allowed in a relation due to the fact that they lead to redundancy of the data base which in turn, slowing down the speed of the database when data processing such as inserting, querying, updating, deleting, etc are being performed.

4 0
3 years ago
Implement the simulation of a biased 6-sided die which takes the values 1,2,3,4,5,6 with probabilities 1/8,1/12,1/8,1/12,1/12,1/
hjlf

Answer:

see explaination

Explanation:

import numpy as np

import matplotlib.pyplot as plt

a = [1, 2, 3, 4, 5, 6]

prob = [1.0/8.0, 1.0/12.0, 1.0/8.0, 1.0/12.0, 1.0/12.0, 1.0/2.0]

smls = 1000000

rolls = list(np.random.choice(a, smls, p=prob))

counts = [rolls.count(i) for i in a]

prob_exper = [float(counts[i])/1000000.0 for i in range(6)]

print("\nProbabilities from experiment : \n\n", prob_exper, end = "\n\n")

plt.hist(rolls)

plt.title("Histogram with counts")

plt.show()

check attachment output and histogram

4 0
3 years ago
1. Target area range is a survey of what lies about __________ seconds ahead of the vehicle. A. 5-10 B. 10-20 C. 20-30 D. 40-50
pshichka [43]

Answer:

Target area range is a survey of what lies about 12-20 seconds ahead of the vehicle. Correct Answer is B. (10-20 second)

Explanation:

Target area range is the space between your vehicle and the target area. A target area is an area on the roadway where the target is located. A target can be anything such as a car, a traffic signal, a blackhead, etc.

Target area range is also a section of roadway where the target is located and the area to the left and right of the target area

4 0
3 years ago
Read 2 more answers
Other questions:
  • When preparing a document flowchart, the names of organizational departments or job functions should appear in theA) column head
    6·1 answer
  • What is the difference between line art and continuous tone copy?
    14·1 answer
  • What is the definition of software? Group of answer choices an instruction that causes a single specific action to be performed
    11·1 answer
  • A ________ is a single media file including art, sound, animation, or movies.
    9·1 answer
  • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
    14·1 answer
  • Most network behavior analysis system sensors can be deployed in __________ mode only, using the same connection methods as netw
    8·1 answer
  • Define a new class Fighter that inherits from Spaceship. Add a variable property weapon that defaults to an empty string and a v
    14·1 answer
  • Importance of computer​
    15·1 answer
  • A good CRM should Integrate marketing, sales, and customer support activities measuring and evaluating the process of knowledge
    13·1 answer
  • Write a Python program that prints all the numbers from 0 to 6 except 3
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!