Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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.
Step by Step Solution
★★★★★
3.59 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started