Questions: A class for drawing 2D geometric shapes provides two services to draw circles and rectangles....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Questions: A class for drawing 2D geometric shapes provides two services to draw circles and rectangles. To draw a circle, one non-null point and a radius are provided to the draw method. The method confirms successful completion of painting the required circle by returning a string formatted as follows: Circle: center (x, y), radius = n. The class also provides a draw method for drawing a rectangle from two points: top-left corner and bottom-right corner. I Also, both shapes allow clients to calculate their area and perimeter. Notice that a point is a class (Point) that store two coordinates (x and y) and allows through a constructor to set values for these coordinates. Once the coordinates' values have been set, they cannot be changed from within a point object or by an external client. Task 7.1: Create a folder on your machine and name it IDTask7.1 1. Initialize this folder as a Git repository. Task 7.1: Create a folder on your machine and name it IDTask7.1 1. Initialize this folder as a Git repository. ▸ 2. Define an abstract class Shape and extend it by two concrete classes: a Circle and a Rectangle. Store all files in the folder IDTask7.1 3. Compile your classes and demo that they work. 4. Based on the description above, write four specifications: one for each method of the two shapes. 5. Add all the specification to the source files, each atop its method, using Java standard annotation. 6. Compress the repository and upload at IDTask7.1 link in the Lab course website. Questions: In Task7.1, you have done four specifications. Re-write all the specifications such that all are stronger than their originals. Task 7.2: Create a folder on your machine and name it IDTask7.2 1. Initialize this folder as a Git repository. 2. Copy all *.java from IDTask7.1 to IDTask7.2. 3. Strengthen the four specifications and explain in comments how the new specs are stronger than the old specs. 4. Compress the repository and upload at IDTask7.2 link in the Lab course website. Questions: A class for drawing 2D geometric shapes provides two services to draw circles and rectangles. To draw a circle, one non-null point and a radius are provided to the draw method. The method confirms successful completion of painting the required circle by returning a string formatted as follows: Circle: center (x, y), radius = n. The class also provides a draw method for drawing a rectangle from two points: top-left corner and bottom-right corner. I Also, both shapes allow clients to calculate their area and perimeter. Notice that a point is a class (Point) that store two coordinates (x and y) and allows through a constructor to set values for these coordinates. Once the coordinates' values have been set, they cannot be changed from within a point object or by an external client. Task 7.1: Create a folder on your machine and name it IDTask7.1 1. Initialize this folder as a Git repository. Task 7.1: Create a folder on your machine and name it IDTask7.1 1. Initialize this folder as a Git repository. ▸ 2. Define an abstract class Shape and extend it by two concrete classes: a Circle and a Rectangle. Store all files in the folder IDTask7.1 3. Compile your classes and demo that they work. 4. Based on the description above, write four specifications: one for each method of the two shapes. 5. Add all the specification to the source files, each atop its method, using Java standard annotation. 6. Compress the repository and upload at IDTask7.1 link in the Lab course website. Questions: In Task7.1, you have done four specifications. Re-write all the specifications such that all are stronger than their originals. Task 7.2: Create a folder on your machine and name it IDTask7.2 1. Initialize this folder as a Git repository. 2. Copy all *.java from IDTask7.1 to IDTask7.2. 3. Strengthen the four specifications and explain in comments how the new specs are stronger than the old specs. 4. Compress the repository and upload at IDTask7.2 link in the Lab course website.
Expert Answer:
Answer rating: 100% (QA)
Task 1 Creating the IDTask71 folder and initializing it as a Git repository To create a folder on your machine you can follow these steps Open the file explorer or terminal on your machine Navigate to ... View the full answer
Related Book For
Fundamental Managerial Accounting Concepts
ISBN: 978-1259569197
8th edition
Authors: Thomas Edmonds, Christopher Edmonds, Bor Yi Tsay, Philip Olds
Posted Date:
Students also viewed these programming questions
-
Circle K was once one of the largest convenience store chains in the United States. Circle K separated its products into two major categories: gasoline and merchandise (Twinkies, beef jerky, soda...
-
One or both of the following have geometric isomers. Draw the structures of any geometric isomers. a. b. CH:CHCH-CHCH3 CH3 CH3
-
Two concentric circles have radii x and y, where y > x. The area between the circles is at least 10 square units. (a) Write a system of inequalities that describes the constraints on the circles. (b)...
-
You are the senior auditor in charge of the December 31, 2018, year-end audit for Cleo Patrick Cosmetics Inc. (CPCI). CPCI is a large, privately held Canadian company that was founded in 1999 by one...
-
Using the relation given in Prob. 18.119, determine the period of precession of the north pole of the earth about the axis of symmetry of the earth. The earth may be approximated by an oblate...
-
Using the data contained in Figure 2.3, what 52-week rate of return, excluding dividend yields, would an investor have received by purchasing the following portfolios of stocks? a. The stocks in the...
-
The standard deviation of the earnings on Bouygues shares is 40%, while for Siemens it is only 28%. However, Bouygues has a of 1.13 and Siemens of 1.7. Explain how this is possible.
-
The Lane Company was incorporated in 2001. Because it had become successful, the company established a defined benefit pension plan for its employees on January 1, 2010. Due to the loyalty of its...
-
g(x)=1 Step 3 of 4: Graph the given function by indicating how the more basic function has been shifted, reflected, stretched, or compressed. Answer 2 Points Keyp Keyboard Shor Select the type of...
-
Better Fitness, Inc. (BFI) manufactures exercise equipment at its plant in Freeport, Long Island. It recently designed two universal weight machines for the home exercise market. Both machines use...
-
Part 1 - https://www.ascd.org/el/articles/supporting-deaf-students-and-all-students Describe one kind of assistive technology can be used to support deaf/hard of hearing learners. Describe one kind...
-
Create your own life map (it could be a drawing, bullet points, paragraph or time line). Include things like important events, influential people, challenges and successes, and any other learning...
-
Use the VELOCITY vs. TIME graph below to answer the following questions. Let west be the positive direction & east be the negative direction. Express all answers in the appropriate mks units. [NOTE:...
-
Two competing project proposals, 1 and 2, are currently under consideration for the manufacture of a new product line. Information for each of the projects is as follows, with cash flows stated in...
-
Choose a brand and find at least two examples for each of the following: o Paidmedia o Ownedmedia o Earnedmedia 2. Create a three-slide PowerPoint presentation: one slide for paid media, one slide...
-
Discuss the meaning of the specific heat of water which is represented by the formula: specific heat of water = 1.00 cal/(g C). Given that 1.00 calorie is needed to increase the temperature of 1.00...
-
Please let me know and round accordingly. Consider the following premerger information about a bidding firm (Firm B) and a target firm (Firm T). Assume that both firms have no debt outstanding. Firm...
-
Determine the annual percentage yield for a loan that charges a monthly interest rate of 1.5% and compounds the interest monthly.
-
Imboden Manufacturing Company established the following standard price and cost data: Sales price ...........................................................................$15 per unit Variable...
-
Nunn Company, which sells electric razors, had $200,000 of cost of goods sold during the month of June. The company projects a 5 percent increase in cost of goods sold during July. The inventory...
-
Ashton Ski Company manufactures snow skis. During the most recent accounting period, the company's finishing department transferred 5,000 sets of skis to finished goods. At the end of the accounting...
-
Western Power is considering the replacement of an old billing system with new software that should save $5,000 per year in net cash operating costs. The old system has zero disposal value, but it...
-
Toyland Company was one of the original producers of Transformers. An especially complex part of Sect-a-con needs special tools that are not useful for other products. These tools were purchased on...
-
Explain the major features and advantages of a master budget.
Study smarter with the SolutionInn App