Draw the UML diagram of Heptagon. - Read the description of the class below and then answer
Fantastic news! We've Found the answer you've been seeking!
Question:
Draw the UML diagram of Heptagon.
Transcribed Image Text:
- Read the description of the class below and then answer the following questions. Suppose you have to write a class named Heptagon. Assume that all seven sides of the Heptagon are of equal length. The class should contain: • private data field: side (double) • A public static field numOfHeptagon (int) which should count the number of heptagons created. • A default constructor with no argument. • A constructor that creates a Heptagon object with specified data field. Getter and setter methods for the data field. . . A method named getArea(). The area can be computed using the following formula, where 'a' is the side: • Area = a² cot (¹80) • A method named getPerimeter(). - Read the description of the class below and then answer the following questions. Suppose you have to write a class named Heptagon. Assume that all seven sides of the Heptagon are of equal length. The class should contain: • private data field: side (double) • A public static field numOfHeptagon (int) which should count the number of heptagons created. • A default constructor with no argument. • A constructor that creates a Heptagon object with specified data field. Getter and setter methods for the data field. . . A method named getArea(). The area can be computed using the following formula, where 'a' is the side: • Area = a² cot (¹80) • A method named getPerimeter().
Expert Answer:
Answer rating: 100% (QA)
Step 1 Heptagonjava package Shapes public class Heptagon private data field side double private double side public static field numOfHeptagon int whic... View the full answer
Related Book For
Introduction To Java Programming And Data Structures Comprehensive Version
ISBN: 9780136520238
12th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these accounting questions
-
Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of transactions at a store (cash, credit card, etc.). Show some appropriate variables and...
-
Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of trees (oak, elm, etc.). Show some appropriate variables and method names for at least...
-
Draw a UML class diagram showing an inheritance hierarchy containing classes that represent different types of airplanes. Show some appropriate variables and method names for at least two of these...
-
Your company has just been names in as a defendant in a lawsuit because of an accident. The plaintiff is suing for $400,000 in damages. You have contacted legal counsel and the attorneys have advised...
-
1. A market is considered unconcentrated if the Herfindahl-Hirschman Index (HHI) is below _______and is highly concentrated if the HHI is at least ______. 2. For a market with four firms, each with a...
-
Jill is a registrant and performed some consulting work for a US company from her home office in Fredericton, New Brunswick. She is not sure whether she needs to charge HST or if she can claim input...
-
You just received an unexpected bonus at work of \($10,000.\) While you plan on using a bit of it to celebrate by purchasing all the accounting books you ever dreamed of, how much should you deposit...
-
Daan Corporation wholesales repair products to equipment manufacturers. On March 1, 2010, Daan Corporation issued $24,000,000 of five-year, 12% bonds at an effective interest rate of 10%, receiving...
-
Midnight Sun Apparel Company uses normal costing, and manufacturing overhead is applied to work-in-process on the basis of machine hours. On January 1 of the current year, there were no balances in...
-
One subunit of Racer Sports Company had the following financial results last month: Requirements 1. Complete the performance evaluation report for this subunit (round to two decimal places). 2. Based...
-
Johnson is part owner of a law firm, Kingston Law Offices, LLP. His firm services sports teams and high-wealth individuals, including professional athletes. As part of his job, he entertains clients...
-
With a given String object called org containing a value "American Quarter Horse Association", write a program to output an abbreviation of the string, \(\mathrm{AQHA}\).
-
Declare a Boolean variable, isEligible, and assign it a value of false.
-
Identify the syntax errors in the following code segment: int product; product = 1; for (i=1, i
-
Describe how to differentiate methods with the same name defined in the same class.
-
The Fibonacci sequence is the series of numbers which can be found by adding up the two numbers before it as shown below: \[ 0,1,1,2,3,5,8,13,21,34, \ldots \] Write a complete program to compute the...
-
Consider the following theorem. If two secant segments are drawn to a circle from an external point, then the products of the length of each secant with the length of its external segment are equal....
-
If the amplifier indicated by the box input impedance of oo, which of the following statements are true ? has an open loop gain as well as Feedback factor (\beta = 1/ R_1\) The feedback is voltage...
-
Write a program that creates an ArrayList and adds a Loan object, a Date object, a string, and a Circle object to the list, and use a loop to display all the elements in the list by invoking the...
-
You can approximate e using the following summation: Write a program that displays the e value for i = 1, 2, , and 20. Format the number to display 16 digits after the decimal point. (Hint: Because...
-
Develop a servlet that displays the number of visits on the servlet. Also display the clients host name and IP address, as shown in Figure 37.26. Exercise37_03a - Mozila Firefox Edit Vew History...
-
Classify these Bluetooth layers using the OSI model: a. baseband; b. L2CAP; c. RFCOMM.
-
Use the power state machine of Fig. 8.12 to determine the energy used in these use cases: a. idle 1 s; receive 10 ms; idle 0.1 s; transmit 5 s; b. sleep 1 min; receive 50 ms; idle 0.1 s; receive 100...
-
What are the main phases of a design review?
Study smarter with the SolutionInn App