Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago