give UML_diagram and some explanations Remember the shape class we have been going over since the beginning
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Remember the shape class we have been going over since the beginning of the term? The goal of this assignment is to fully implement the functionality of a shape class, according to the following: You must have an interface for Shape You will develop the following classes implementing Shape: o Square o Triangle (assume that it is an equilateral triangle, meaning all of its sides are equal) Circle o o Pentagon Each shape must be able to perform the following functionalities: Get the area of the shape (10%) o o O O Get the perimeter of the shape (10%) Get/set the parameters of a shape: (20%) A circle has a center and a radius ▪ A triangle has a center and the length of the side A square has a center and the length of the side A pentagon has a center and the length of the side (all sides of the pentagon are equal) Ability to move the shape into a new location according to an offset x and offset y (10%) Remember the shape class we have been going over since the beginning of the term? The goal of this assignment is to fully implement the functionality of a shape class, according to the following: You must have an interface for Shape You will develop the following classes implementing Shape: o Square o Triangle (assume that it is an equilateral triangle, meaning all of its sides are equal) Circle o o Pentagon Each shape must be able to perform the following functionalities: Get the area of the shape (10%) o o O O Get the perimeter of the shape (10%) Get/set the parameters of a shape: (20%) A circle has a center and a radius ▪ A triangle has a center and the length of the side A square has a center and the length of the side A pentagon has a center and the length of the side (all sides of the pentagon are equal) Ability to move the shape into a new location according to an offset x and offset y (10%)
Expert Answer:
Answer rating: 100% (QA)
Shape Interface 10 getArea double To calculate and return the area of the shape ... View the full answer
Related Book For
Fundamentals Of Electric Circuits
ISBN: 9780073301150
3rd Edition
Authors: Matthew Sadiku, Charles Alexander
Posted Date:
Students also viewed these programming questions
-
Consider the simple 3-station assembly line illustrated below, where the 2 machines at Station 1 are parallel, i.e., the product only needs to go through one of the 2 machines before proceeding to...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Photons of wavelength 1.68 cm excite transitions from the rotational ground state to the first rotational excited state in a gas. Whats the rotational inertia of the gas molecules?
-
For the same steam power plant and Problem 6.39, determine the rate of heat transfer in the economizer which is a low temperature heat exchanger and the steam generator. Determine also the flow rate...
-
2. (25 points). A solid aluminum alloy rod (k = 200 W/m K) of diameter D = 5 mm and total length 2L = 120 mm is at an initial temperature of T;= 100C. The rod is suddenly cooled in a large bath of...
-
Suppose that the price of an asset follows a Brownian motion : \[d S=\mu S d t+\sigma S d z\] (a) What is the stochastic process for \(S^{n}\) ? (b) What is the expected value for \(S^{n}\) ?
-
Suppose that on January 6, 2016, Westfall Motors paid $360,000,000 for its 40% investment in Phase Motors. Assume Phase earned net income of $20,000,000 and paid cash dividends of $25,000,000 to all...
-
After reading the Harvard Business Review article "Do You Know Your Cost of Capital?," why do you think financial managers make so many errors in estimating the components of the WACC, and what are...
-
Bottle-Up, Inc., was organized on January 8, 2010, and made its S election on January 24, 2010. The necessary consents to the election were filed in a timely manner. Its address is 1234 Hill Street,...
-
Soto, Inc. has a total assets turnover of 1.30, a profit margin of 14 percent, and a debt ratio of 0.26. The CFO, Daniel, wants to double the current return on equity by making some changes. If he...
-
Define the Variance Inflation Factor. What function does it perform in regression analysis?
-
Describe fully how the Variance Inflation Factor for a variable can be determined.
-
What conditions are most likely to precipitate heteroscedasticity?
-
Judd Harrison owns 200 shares of stock in the Widget Company for which he paid \(\$ 1,600\) in 1999 . The board of directors of the company decided to pay a 10 percent stock dividend in April 2018,...
-
Discuss the various methods to detect multicollinearity. What advantages and disadvantages does each method of detection offer?
-
__________ is the single factor that best indicates social class. a. Product b. Money c. Income levels d. Time
-
on 8 For the following set of lengths 130, 170, 160, 160, 150, 190 Third quartile is: et red d out of Select one: O a. 160 a question O b. 145 O c. 175 O d. 180
-
Apply nodal analysis to the circuit in Fig. 10.60 and determine Io. Io 2 2 2I j8
-
Using phasors, find: (a) 3cos(20t + 10) - 5 cos(20t- 30) (b) 40 sin 50t + 30 cos(50t - 45) (c) 20 sin 400t + 10 cos(400t + 60) -5 sin(400t - 20)
-
For the circuit in Fig. 11.38, is = 6 cos 103 t A. Find the average power absorbed by the 50- Ω resistor. 50 20 mH 10
-
Which of the following questions can an interviewer legally ask a job candidate during a telephone interview? (a) Are you pregnant or planning to soon start a family? (b) What skills do you have that...
-
An employment test that yields different results over time when taken by the same person lacks ____________. (a) validity (b) reliability (c) realism (d) behavioral anchors
-
The responses most likely to be associated with use of a force-coercion change strategy are best described as __________. (a) internalized commitment (b) temporary compliance (c) passive cooptation...
Study smarter with the SolutionInn App