Question: all in java SULIT (BEEC 1353) (b) Modify Question Q4(a)(ii) by adding an interface called sides with method printside () and variable of squaresides with

 all in java SULIT (BEEC 1353) (b) Modify Question Q4(a)(ii) by

all in java

SULIT (BEEC 1353) (b) Modify Question Q4(a)(ii) by adding an interface called sides with method printside () and variable of squaresides with the initial value of 4. Create a program which demonstrates the use of interface sides in the subclass square based on the requirement below: Sides interface: W printSide () : a declaration of method Initializes squaresides variable with the given value of 4. Square subclass: Square (): The constructor sets height, width and figureType by calling the superclass constructor. DetermineArea ( ): The method calculates an area of a square: ( area height * width]. printside (): Print the number of side of the figure square Sides and call the Display() method from it's superclass. [8 marks)

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!