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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started