Farmers Market: Write a Java program to perform check-out functionality for a simple Farmers Market store with exactly 5 products:
Product - Price per pound
Bananas - $ 0.44
Apples - $ 0.99
Cucumbers - $ 1.19
Carrots - $ 0.89
Oranges - $ 0.79
After getting the weight for each product purchase and compute & output the total purchase amount in the end. Do not use loops or arrays in this assignment. You can assume that all the user inputs are valid & the user will enter 0 for products (s)he does not purchase – no need to do any input validation explicitly. Use meaningful variable names & achieve "self-documenting" style of coding.
Let us expand Farmersmarket.java program to apply discounts. Share your program in the forum and explain how you did it so that others can benefit from it.
Farmers market introduces two types of discounts to attract more customers and make each customer to purchase more.
Discount card program to attract customers. All customers who have signed up for it are considered as "special customers" and they get automatic minimum 10% discount off based on the total purchase amount. However, this cannot be combined with other discounts.
All customers are eligible for the following discount program. If the total purchase is above $50, 5% discount will apply. If the total purchase exceeds $75, 10% discount will apply. If the total purchase exceeds $100, 15% discount will apply.
After computing the total purchase amount, program should determine the discount & output the following items if a discount is applied:
discount % and discount amount