Question: Test 3(13 points) Inheritance and Polymorhpism. 1) (3 points)Design an interface named Shapable containing two methods: calArea() and calPerimeter(). The method calArea() returns the area

Test 3(13 points) Inheritance and Polymorhpism. 1) (3 points)Design an interface named Shapable containing two methods: calArea() and calPerimeter(). The method calArea() returns the area of the given shape and the method calPerimeter () returns the perimeter of the given shape. 2/3 2) (4 points)Design a class named Rectangle implementing Shapable. a) Declare two instance variables width and height. b) Overload constructors. c) Override the method calArea(). d) Override the method calPerimeter(). e) Define setters and getters. 3) (4 points) Design a class named Triangle implementing Shapable. a) Declare properties for a triangle b) Overload constructors. c) Override the method calArea(). d) Override the method calPerimeter(). e) Append the method named is RightTriangle() to test if it is a right triangle. If so, the method returns true. Otherwise it returns false. 4) (2points) Create a project to test whether all of subclasses meet the requirements Test 4(10 points) Java API and Its application Write a project to copy a text file. For example, copy a text file test.txt from d:\data\ to k:\datal. The project needs to perform the followings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
