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
mafiozo [28]
3 years ago
8

Implement a program that manages shapes. Implement a class named Shape with a method area() which returns the double value 0.0.

Implement three derived classes named Rectangle, Square, and Circle. Declare necessary properties in each including getter and setter function and a constructor that sets the values of these properties. Override the area() function in each by calculating the area using the defined properties in that class.Using Java to write a program that repeatedly shows the user a menu to create one of the three main shapes or to print the shapes created so far. If the user selects to create a new shape, the program prompts the user to enter the values for the size of the selected shape. The shape is then stored in an array. If the user selects to print the current shapes, print the name and the total area of each shape to the console.Hint: You may limit the size of the array to 10.
Engineering
1 answer:
djverab [1.8K]3 years ago
3 0

Answer:

Explanation:

The following code was written in Java. It creates classes for each one of the shapes requested and includes all of their variables and the area method, as well as a toString method. Then in the main method, the menu is created which allows the user to enter the shape that they want and if they decide to exit it will print out every shape within the shapes array. Due to technical reasons I have added the code as a txt file below and in the picture you can see the output.

Download txt
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
19e97f0877c0f4554bca1f4a163eadac.jpg
You might be interested in
Tech a says that the weight of the flywheel smoothest out the engines power pulses. Tech B says that the flexplate and torque co
lakkis [162]

Answer:

both statement is correct

Explanation:

Flywheel engine uses to reduce fluctuations.

And                                                                

FlexPlate is a metal disk that connects the output from the engine to the input of the torque converter. This will replace the flywheel

so that both statement is correct

4 0
3 years ago
Whose job is it to ensure that a group stays focused and on schedule?
Sedbober [7]

Answer:

the leader or organizer. you should have assigned jobs, so one of them should be in charge. if you did not assign jobs, assign them now, and one person has a job, and they must be held accountable. if they cannot do their job, someone might have to take over, but then you tell your prof. that they could not do their part, so hopefully you will get the credit you deserve and they will not.

Explanation:

3 0
3 years ago
Read 2 more answers
Best use for a suspension bridge
babunello [35]

Answer:

over a rive or fast moving water or canyon

Explanation: you would use a suspension bridge in an area where you can't put supports down.

4 0
3 years ago
Joe is a chemical engineer whose plant discharges heavy metals into the local river. By the test authorized by the city governme
chubhunter [2.5K]

Answer:

B probably

Explanation:

Because the prompt doesn't specify what sort of violation it could be anything maybe when they release the metals during the day and so on.

5 0
2 years ago
What i s the value of a capacitor with 250 V applied and has 500 pC of charge? (a) 200 uF (b) 0.5 pF (c) 500 uF (d) 2 pF
exis [7]

Answer:

(d) 2 pF

Explanation: the charge on capacitor is given by the expression

Q=CV

where Q=charge

           C=capacitance

           V=voltage across the plate of the capacitor

here we have given Q=500 pF, V=250 volt

using this formula C=\frac{Q}{V}

=500×10^{-12}×\frac{1}{250}

=2×10^{-12}

=2 pF

3 0
3 years ago
Other questions:
  • If a ball is dropped from a height​ (H) its velocity will increase until it hits the ground​ (assuming that aerodynamic drag due
    5·1 answer
  • What is a thermal reservoir?
    15·1 answer
  • A driver is traveling at 52 mi/h on a wet road. an object is spotted on the road 415 ft ahead and the driver is able to come to
    5·2 answers
  • Give an example of one technology that is well matched to the needs of the environment, and one technology that is not.
    9·1 answer
  • A polymeric extruder is turned on and immediately begins producing a product at a rate of 10 kg/min. An operator realizes 20 min
    12·1 answer
  • For a flow rate of 212 cfs find the critical depth in (a) a rectangular channel with ????=6.5 ft, (b) a triangular channel with
    10·1 answer
  • Water at 20◦C is pumped through 1000 ft of 0.425 ft diameter pipe at a volumetric flowrate of 1 ft3/s through a cast iron pipe t
    14·1 answer
  • The difference in potential energy between an electron at the negative terminal and one at the positive terminal is called the _
    11·1 answer
  • Refrigerant-134a enters the expansion valve of a refrigeration system at 120 psia as a saturated liquid and leaves at 20 psia. D
    15·1 answer
  • When economist determine that a nations GDP has declined, they can point to this as a sign of what?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!