Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Dhofar Water Company needs to create a bill calculation information In this process, the operations initiated by the company are customer information, amount calculation of

image text in transcribed
Dhofar Water Company needs to create a bill calculation information In this process, the operations initiated by the company are customer information, amount calculation of water consumption, and display of customer details. Write a Java program to create an object class "Waterbill" and do the following operations Member Variables: customerno, customername, current_meter_reading previous_meter_reading. Units Consumed, Billamount Member Methods : a. Read() To read the values such as customerno, customername. (1 Mark) current_meter_reading, and previous_meter_reading. Get the input through the keyboard. b. Bill Cale() To calculate Units Consumed and Billamount using the formula 2 Marks) and condition which are given below Formula: Units Consumed = current_meter_reading previous_meter_reading. Condition: Units Consumed Billamount >0 and=100 Units Consumed x 0.50 baise >100 and300 14 Rials + (UnitConsumed - 300) x 0.75 c. Display ( ) To display customerno, customername, ( Mark) current_meter reading. previous_meter_reading Billamount Create a driver or control class called Waterbill_Test. In this class, the main method is (1 Mark) used to call the methods Read 0. Bill Calco, and Display and

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago