I"Mazoon Electricity" caleulates the electricity bill based on the units consumed as follows: Units Consumed Bill amount No bill Between 1 to 300 Between 351 to 400 Above 400 Units Consumed * 20 baisa...


use Java program


I

Extracted text: I"Mazoon Electricity" caleulates the electricity bill based on the units consumed as follows: Units Consumed Bill amount No bill Between 1 to 300 Between 351 to 400 Above 400 Units Consumed * 20 baisa 6 OMR + (Units Consumed– 300 ) * 40 baisa 10 OMR + (Units Consumed – 400 ) * 50 baisa Units Consumed = Current Meter Reading– Previous Meter Reading. Develop and execute a Java program to accept the necessary inputs and print the Consumer code, Consumer name, Units consumed and Bill amount. Create a class with your name with the following members Member variables: Consumer code, Consumer name, Current meter reading, previous meter reading. Member Methods: To set/input the meter reading To caleulate and return the units consumed and bill amount To display all the details. Create the controlling class with your college id with appropriate object and perform the given task. Use constructor to pass the values of Consumer code, Consumer name from main method to the called elass. [Input values through keyboard] [Marks Distribution: Class and member variables :2 Marks Input method and Constructor: 2 Marks Calculate Method :2 Marks Display Method :2 Marks Main Method with Object :2 Marks )

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here