Add a copy constructor to the Book class that takes another…

Add a copy constructor to the Book class that takes another Book object and creates a new Book with the same title and price.public class Book {    private String title;    private double price;     public Book() {        this.title = “Unknown”;        this.price = 0.0;    }     public Book(String title, double price) {        this.title = title;        this.price = price;    }     @Override    public String toString() {        return title + “: $” + price;    }}

Define an interface Resizable with a method void resize(doub…

Define an interface Resizable with a method void resize(double factor);.Write a class Rectangle that: ·         Implements Resizable. ·         Has private fields width and height (double). ·         Has a parameterized constructor Rectangle(double width, double height). ·         Has a copy constructor Rectangle(Rectangle other). ·         Implements resize by multiplying both width and height by factor.