Question: Write Java program that perform the following 1. Create class StoreSale for clothing store with a constant name storeName, storeAdress, storeOpentime, storeCloseTime, and a static
Write Java program that perform the following 1. Create class StoreSale for clothing store with a constant name storeName, storeAdress, storeOpentime, storeCloseTime, and a static variable DiscountRate to apply sale discount on each product. 3. Each object of the class StoreSale contains private reference to object of other class named Product that includes static variable productNumber, and brandName, productSize, productOrginalPrice and productSalePrice. The productSize should be any of the following: small, large, xlarge, 2xlarge. 4. Provide constructors with/without parameters for classes, setter and getter methods for both classes. 5. Provide method calculateDiscount() to calculate the productSalePrice. 6. Provide a static method modifyDiscountRate() in class StoreSale that sets the sale rate DiscountRate to a new value. 7. Write a program to test class StoreSale - Instantiate two StoreSale objects store1, store2, and two product objects, product1 and product 2 in each store. - Set DiscountRate to 10% in store1 and 5% in store2, then calculate the productSalePrice and print the values for products in each store. - Set the DiscountRate to 12% in each store and calculate the productSalePrice and print the values for both products
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
