Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Aims:Introducing specificationsand their design. Topic:SpecificationsChecklist:1.Java compiler and Java Runtime Environment have the same version and their version is 8 or higher.2.Notepad++ is configured such that

Aims:Introducing specificationsand their design. Topic:SpecificationsChecklist:1.Java compiler and Java Runtime Environment have the same version and their version is 8 or higher.2.Notepad++ is configured such that the Tab length is 3 spaces.Summary:Given a descriptionof a method, write up a formalspecificationdescribing input parameters and the relation between inputand output of the method together with the method signature.Questions:A classfor drawing 2D geometric shapes provides two services to draw circlesand rectangles. To draw a circle, one non-null pointand a radiusare provided to the drawmethod. The method confirms successful completion of painting the required circleby returning a string formatted as follows:Circle: center (x, y), radius = n.The class also provides a drawmethod for drawing a rectangle from twopoints: top-left corner and bottom-right corner. Also, both shapes allowclients to calculatetheirareaand 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 coordinatesvalueshavebeen set, theycannotbe changed from within a point object or byan external client.Task 7.1: Createa folder on your machine and name it IDTask7.11.Initialize this folder as a Git repository. 2.Define an abstract class Shapeand extend it by two concrete classes: a Circle and a Rectangle. Store all files in the folder IDTask7.13.Compile your classes and demo thatthey work.4.Based on the description above, write fourspecifications: one for each method of the two shapes.5.Add all the specification to thesource files, each atop its method, using Java standard annotation.6.Compress the repository and upload at IDTask7.1link in the Lab course website.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions