Question #94349

Write a program to apply the package. The package is customer will consist classes of member and non-member.
Member:
- There are method to calculate discount() -15% per item.
Non-member:
- No discount

Expert's answer

package customer;

public class Member {

    public double discount(double costOfItem)
    {
        return costOfItem*0.15;
    }
}



package customer;

public class NonMember {

    public double discount(double costOfItem)
    {
        return 0;
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS