Write a program that would resemble a power utility billing system. There will be an input window that would enter or input the meter number (5 numeric digits) and the present meter reading in kilowatt hours, the maximum would be 9999 kilowatts. A search from a 2d-arraylist would be made in order to get the previous meter reading of a particular meter number. The 2d- arraylist consists of meter number (5 numeric digits) and the previous meter reading in kilowatt hours (4 numeric digits with 9999 as maximum value). Provide at least 5 sample data or 5 rows with meter number and previous meter reading each row for the 2d-arraylist. When an input of meter number and present meter reading is made, search the 2d-arraylist for the equivalent meter number. If a match is found, get the kilowatt hour used (KWH) by subtracting the previous meter reading from the present meter reading. Note that if the present meter reading is less than previous meter reading, add 10000 first to the present meter reading before subtracting the previous meter reading. To compute for the amount to be paid, check first if the customer is a residential or commercial. This checking is to be done through another 2d-arraylist which contains the meter number and the customer code. Provide also at least 5 test data or 5 rows with meter number (must be the same with the meter numbers of the previous 2d-arraylist) and customer code (either R for residential, C for commercial) each row. For residential customers: If the KWH is less than or equal to 100 multiply it by 1.50; if the KWH is more than 100 but less than or equal to 200 multiply it by 2.00; for more than 200 KWH multiply it by 2.50. For commercial customers: if the KWH is less than or equal to 100 multiply it by 3.00; If the KWH is more than 100 but less than or equal to 200, multiply it by 4.00; for more than 200 KWH multiply it by 5.00. Display in a window the following information: meter number, customer code, previous meter reading, present meter reading, the kilowatt hour used or KWH, and the amount to be paid. If no match is found in the 2d-arraylist, add as new element the meter number and the meter reading to the 2d-arraylist. Note: You must put initial values in the 2d-arraylists required in this program, at least 10 test data for each 2d-arraylists. Before exiting the program replace the previous meter reading in the 2d-arraylist by the present meter reading in preparation for the next billing period. Show also the updated 2d-arraylist by displaying the elements. Design your own input and output windows. Your work will be graded according to your compliance with instructions given, how you design your input and output windows, and your promptness in submission. (USE OOP CONCEPT AND JOPTION)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1. Write a program that would resemble a power utility billing system. There will be an input window that would enter or input the meter number (5 numeric digits) and the present meter reading in kilowatt hours, the maximum would be 9999 kilowatts. A search from a 2d-arraylist would be made in order to get the previous meter reading of a particular meter number. The 2d- arraylist consists of meter number (5 numeric digits) and the previous meter reading in kilowatt hours (4 numeric digits with 9999 as maximum value). Provide at least 5 sample data or 5 rows with meter number and previous meter reading each row for the 2d-arraylist. When an input of meter number and present meter reading is made, search the 2d-arraylist for the equivalent meter number. If a match is found, get the kilowatt hour used (KWH) by subtracting the previous meter reading from the present meter reading. Note that if the present meter reading is less than previous meter reading, add 10000 first to the present meter reading before subtracting the previous meter reading. To compute for the amount to be paid, check first if the customer is a residential or commercial. This checking is to be done through another 2d-arraylist which contains the meter number and the customer code. Provide also at least 5 test data or 5 rows with meter number (must be the same with the meter numbers of the previous 2d-arraylist) and customer code (either R for residential, C for commercial) each row. For residential customers: If the KWH is less than or equal to 100 multiply it by 1.50; if the KWH is more than 100 but less than or equal to 200 multiply it by 2.00; for more than 200 KWH multiply it by 2.50. For commercial customers: if the KWH is less than or equal to 100 multiply it by 3.00; If the KWH is more than 100 but less than or equal to 200, multiply it by 4.00; for more than 200 KWH multiply it by 5.00. Display in a window the following information: meter number, customer code, previous meter reading, present meter reading, the kilowatt hour used or KWH, and the amount to be paid. If no match is found in the 2d-arraylist, add as new element the meter number and the meter reading to the 2d-arraylist. Note: You must put initial values in the 2d-arraylists required in this program, at least 10 test data for each 2d-arraylists. Before exiting the program replace the previous meter reading in the 2d-arraylist by the present meter reading in preparation for the next billing period. Show also the updated 2d-arraylist by displaying the elements. Design your own input and output windows. Your work will be graded according to your compliance with instructions given, how you design your input and output windows, and your promptness in submission. (USE OOP CONCEPT AND JOPTION)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education