Question: a. Constructor: to set the values of the attributes. b. Getter methods for all the instance variables. C. calcDisc(): to calculate the discount using following

a. Constructor: to set the values of the attributes.

b. Getter methods for all the instance variables.

C. calcDisc(): to calculate the discount using following criteria:

Discount Category ("Male" "Female" "Children")

2% of jewelRate

3% of jewelRate

5% of jewelRate

d. totalAmt(): to calculate and return net meter reading using following formula:Total Amount = Rate x Quantity - Discount

e. displayDetails(): to print all the details of the including total cost. The specifications of the main method are as follows:-

f. Create 3 objects of the JewelBill class.

g. Provide values as per the attributes of the objects.

h. Print details of all the JewelBill objects."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!