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
A manufacturer makes integrated circuits that each have a resistance layer with a target thickness of 200 units. A circuit won't
aleksklad [387]

Answer:

probability P = 0.32

Explanation:

this is incomplete question

i found complete A manufactures makes integrated circuits that each have a resistance layer with a target thickness of 200 units. A circuit won't work well if this thickness varies too much from the target value. These thickness measurements are approximately normally distributed with a mean of 200 units and a standard deviation of 12 units. A random sample of 17 measurements is selected for a quality inspection. We can assume that the measurements in the sample are independent. What is the probability that the mean thickness in these 16 measurements x is farther than 3 units away from the target value?

solution

we know that Standard error is expess as

Standard error = \frac{sd}{\sqrt{n}}

Standard error  = \frac{12}{\sqrt{16}}

Standard error  = 3  

so here we get Z value for 3 units away are from mean are

mean =  -1 and + 1

so here

probability P will be

probability P = P( z < -1 or z > 1)

probability P = 0.1587 + 0.1587

probability P =  0.3174

probability P = 0.32

7 0
3 years ago
At a retirement party, a coworker described terry as dedicated
denis23 [38]

Answer:

At a retirement party, a coworker described Terry as dedicated, hardworking, and dependable. He also said that Terry was a great leader, knew the computer system, and kept the company's finances in order

8 0
3 years ago
Who's your favorite singer and WHT your favorite song​
Anna007 [38]

Answer:

and my favorite song is popular loner

Explanation:

my favorite rapper is rod wave

6 0
3 years ago
Read 2 more answers
¿Qué es la masonería?​
timofeeve [1]

Answer: freemasonry is Being a Mason is about a father helping his son make better decisions; a business leader striving to bring morality to the workplace; a thoughtful man learning to work through tough issues in his life.

Explanation:

3 0
3 years ago
From an aerial photograph, one observes that on a level section of a (multilane) highway, 25% of the vehicles are trucks, 75% ar
egoroff_w [7]

Answer:

(a) Flow rate of vehicles = No of vehicles per mile * Speed

=No of cars per mile * Speed +No of trucks per mile * Speed

= 0.75*50*60 + 0.25*50*40

=2750 vehicles / hour

(b) Let Density of vehicles on grade = x

Density on flat * Speed =Density on grade * Speed

So,( 0.75*50) * 60 + (0.25*50) * 40 = (0.75* x) * 55 + (0.25* x) * 25

So, x= 57.89

So, Density is around 58 Vehicles per Mile.

(c) Percentage of truck by aerial photo = 25%

(d)Percentage of truck bystationary observer on the grade= 25*30/60 * 25/55 =22.73 %

4 0
3 years ago
Other questions:
  • Consider a vortex filament of strength in the shape of a closed circular loop of radius R. Obtain an expression for the velocity
    10·1 answer
  • A certain working substance receives 100 Btu reversibly as heat at a temperature of 1000℉ from an energy source at 3600°R. Refer
    13·1 answer
  • The density of a certain material is such that it weighs 9 pounds per cubic foot of
    10·1 answer
  • 1. The area of the given triangle is 25 square units. What is the value of x?<br> X+2
    8·1 answer
  • A very large plate is placed equidistant between two vertical walls. The 10-mm spacing between the plate and each wall is filled
    11·1 answer
  • Corrections for curvature and refraction (c r) are applied to: ____________.
    8·1 answer
  • What is the difference between class 1 and class 3 lever?
    8·2 answers
  • All of these are true about a magnesium part EXCEPT that it:
    8·1 answer
  • Which type of artificial intelligence (ai) can repeatedly perform tasks of limited scope?
    8·1 answer
  • s) Use Cramer’s rule to solve the system below, and state the condition at which solution exists. ax+by = 1 cx+dy =−1
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!