Write source codes in the Java programming language to defineCustomer and Salesperson classes that inherits from the Personclass defined in the above source code. The Customer class shouldhave an additional attribute called amountSpent of double datatype. The Salesperson class should have an additional method calledcalculateDiscount that takes customer object as an argument,calculates a 10% discount and returns double type. ThedisplayDetails method of the Customer class should display amessage which is different from that of the Salesperson class.
. . .