Question: 2. Write a program in Java using Bluej that performs the following tasks: i. Creates an abstract class called Figures having fileds side1, side2, and

 2. Write a program in Java using Bluej that performs the

2. Write a program in Java using Bluej that performs the following tasks: i. Creates an abstract class called Figures having fileds side1, side2, and a method display() that displays the fields. ii. Add an abstract method called area() in the class Figures which returns a double value. iii. Creates a subclass called Rectangle of the Figures class. iv. Write the constructor for Rectangle class to set the fields side 1 and side2; v. Implement the area() method in the subclass Rectangle to find the area of rectangle. vi. Create object of Ractangle and call display() and area() methods

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!