Write a program that prompts the user to enter the side of a hexagon and displays...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that prompts the user to enter the side of a hexagon and displays the area, perimeter, and radius of a hexagon using the following formulas: 3V3 Area = Perimeter = 6 *S Radius of a hexagon = 3/2 * V3 * s2 You should start to write the code with using the class name and (if necessary) include the imports depending on the question. Write a program that prompts the user to enter the side of a hexagon and displays the area, perimeter, and radius of a hexagon using the following formulas: 3V3 Area = Perimeter = 6 *S Radius of a hexagon = 3/2 * V3 * s2 You should start to write the code with using the class name and (if necessary) include the imports depending on the question.
Expert Answer:
Answer rating: 100% (QA)
include iostream include cmath using namespace std class Hexagon public ... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically and print the middle-valued string. For example, if the three strings were "abcd", "wxyz",...
-
Write a program that prompts the user to enter the side of a hexagon and displays its area. The formula for computing the area of a hexagon is where s is the length of a side. Here is a sample run:...
-
Write a program that prompts the user to enter the length from the center of a pentagon to a vertex and computes the area of the pentagon, as shown in the following figure. The formula for computing...
-
The purpose of this exercise is to compare the return on Tesla stock with the return on a set of options strategies. All returns should be calculated between November 15 and November 25. The Excel...
-
A total of 2452 American adults responded to a survey about their income class and their general health level. Table 24 summarizes their responses. a. What proportion of the lower-income adults have...
-
A market research firms three clients each requested that the firm conduct a sample survey. Four available statisticians can be assigned to these three projects; however, all four statisticians are...
-
Identify and describe the key attributes that might mitigate a red flag, suggesting that no bad act or compliance issues exist.
-
Friendleys Miniature Golf and Driving Range Inc. was opened on March 1 by Dean Barley. These selected events and transactions occurred during March. Mar. 1 Stockholders invested $50,000 cash in the...
-
how to transform this from an EERD to a relational model diagram. Attribute_1-1A Attribute_1-1B Attribute_1-1 Attribute_1-1C Attribute_1-2 Entity 1 FK3 (M,M) Attribute_R_1-2-1 Rel_1-2 Attribute_2-1...
-
Janice Morgan, age 24, is single and has no dependents. She is a freelance writer. In January 2021, Janice opened her own office located at 2751 Waldham Road, Pleasant Hill, NM 88135. She called her...
-
On January 1, 20x7, Hobbes Inc. had 50,000 shares of common shares issued and outstanding. The book value of those shares was $800,000. Furthermore, they had 20,000 $4, non-cumulative, preferred...
-
PJM650 PROJECT SCENARIO McEvers Middle School's principal, Jacqueline Davis, has received grant approval and has been awarded 75 new HP Envy 15-ep1010nr laptops for their three computer labs. The...
-
Should Moore carry all of the responsibility for his actions, or should GTA creators share some of the responsibility? Explain which ethical theory justifies your answer and why. What role do...
-
It has been estimated that equipment bought for $24 000 will have a useful life of six years, at which time it will be thrown away.?
-
One year ago Parker contributed accounts receivable with the basis of 0 dollars and a fair market value of 50,000 to a partnership for a 50% partnership interest Ron contributed this $1000 cash for...
-
We are in end of december 2023 Deandra filed the GST and paid the balance owing of $6,034.87 in January 2023. She wrote the cheque on January 14, 2023. what's the adjustment required in their...
-
a)Today's economic environment is challenged with higher than normal inflation, and the Bank of Canada has resorted to increasing interest rates to cool the economy. briefly describe the impact on...
-
Question 2 For an n x n matrix A = form) via (aij)
-
Exercise enables two players to play the connect-four game on the console. Rewrite a GUI version for the program, as shown in Figure. The program enables two players to place red and yellow discs in...
-
Write a program that paints a smiley face, as shown in Figure 14.46a. (a)
-
Rewrite Programming Exercise 14.10 so that the cylinder?s width and height are automatically resized when the window is resized. Write a program that draws a cylinder, as shown in Figure. You can use...
-
In a steam power plant, coal is burned at the rate of 50 lbm/min. The percentage of ash in the coal is 9% by mass. The combustion of coal takes place in a fluidized bed reactor and the ash in the...
-
2-Mercaptoethanol (C 2 H 6 OS) is produced by reacting ethylene oxide (C 2 H 4 O) with hydrogen sulfide (H 2 S) as per the following reaction equation. The reaction takes place in the presence of...
-
Chlorobenzene is produced by direct chlorination of benzene. However, a parallel reaction that produces dichlorobenzene hexachloride also occurs. The parallel reactions are shown here. The single...
Study smarter with the SolutionInn App