A shopkeeper in afruit shop wants to find total profit he has gained after sellingall the fruits. Develop a java program to find the profits usingthe concept of interface based on the followinginstructions. Save the project/file assellerYourID.
A) Interfacename: Fruitshop
MemberMethod:
–tocalculate and return profit
B) Classname: Shopkeeper implements Fruitshop
Member variables:sellingprice, costprice
Member Methods:
–Constructor to initialize member variables
–tocalculate and return profit
profit = sellingprice- costprice
C) Controllingclass : sellerYourID
–To createan object of Shopkeeper
–To printprofit of Shopkeeper
没有找到相关结果