Also supply a method get area that computes and returns the


1. Provide to String and equals methods for the Question and Choice Question classes of How To 10.1.

2. Implement a subclass Square that extends the Rectangle class. In the constructor, accept the x- and y-positions of the center and the side length of the square. Call the set Location and set Size methods of the Rectangle class. Look up these methods in the documentation for the Rectangle class. Also supply a method get Area that computes and returns the area of the square. Write a sample program that asks for the center and side length, then prints out the square (using the to String method that you inherit from Rectangle) and the area of the square.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Also supply a method get area that computes and returns the
Reference No:- TGS01721418

Expected delivery within 24 Hours