Write a C+ program that helps the electricity company to manage users’ electricity information. You need to define 5 1D arrays to save users' info, as follows: CurrentReading PreviousReading...


code in c++


Write a C+ program that helps the electricity company to manage users’ electricity<br>information. You need to define 5 1D arrays to save users' info, as follows:<br>CurrentReading PreviousReading ElectricityTotal(AED)<br>MeterNo kWh<br>64560 | 665<br>15677 | 234<br>32675 567<br>123<br>345<br>To be calculated<br>124<br>123<br>To be calculated<br>125<br>298<br>To be calculated<br>where<br>int MeterNo[3] represents the meter number.<br>double KillowattHours[3] represents the meter reading in kWh.<br>double ÇurrentReading[3] represents the current meter reading.<br>double PrevieusBeading[3] represents the previous meter reading.<br>double ElectricityTotal[3] represents the total meter reading.<br>Write a function read that reads the electricity information (Meter No, KillowattHours,<br>Current Reading, and Previous Reading) from the user input and stores them in the<br>different arrays. Update your main function to call the function read.<br>a.<br>Function prototype:<br>void read(int meterNo[], double killowattHours[], double<br>currentReading[], double previousReading, int size)<br>b. Write a function totals that calculates the total price in AED per meter and saves<br>them into the ElectricityTotal array, where Customer pay 8.29 fils per kWh. You<br>may use this equation to calculate the total:<br>Total = (currentReading-previousReading)* (fils per kWh)<br>Update the main function to call the function totals.<br>Function prototype:<br>void totals(double currentReading[], double previousReading[],<br>double ElectricityTotal[], int size)<br>c. Write a function sort that sorts users' information in descending order based on the<br>total value, as follows: (No need to print the info on the screen)<br>

Extracted text: Write a C+ program that helps the electricity company to manage users’ electricity information. You need to define 5 1D arrays to save users' info, as follows: CurrentReading PreviousReading ElectricityTotal(AED) MeterNo kWh 64560 | 665 15677 | 234 32675 567 123 345 To be calculated 124 123 To be calculated 125 298 To be calculated where int MeterNo[3] represents the meter number. double KillowattHours[3] represents the meter reading in kWh. double ÇurrentReading[3] represents the current meter reading. double PrevieusBeading[3] represents the previous meter reading. double ElectricityTotal[3] represents the total meter reading. Write a function read that reads the electricity information (Meter No, KillowattHours, Current Reading, and Previous Reading) from the user input and stores them in the different arrays. Update your main function to call the function read. a. Function prototype: void read(int meterNo[], double killowattHours[], double currentReading[], double previousReading, int size) b. Write a function totals that calculates the total price in AED per meter and saves them into the ElectricityTotal array, where Customer pay 8.29 fils per kWh. You may use this equation to calculate the total: Total = (currentReading-previousReading)* (fils per kWh) Update the main function to call the function totals. Function prototype: void totals(double currentReading[], double previousReading[], double ElectricityTotal[], int size) c. Write a function sort that sorts users' information in descending order based on the total value, as follows: (No need to print the info on the screen)
Write a C+ program that helps the electricity company to manage users’ electricity<br>information. You need to define 5 1D arrays to save users' info, as follows:<br>CurrentReading PreviousReading ElectricityTotal(AED)<br>MeterNo kWh<br>64560 | 665<br>15677 | 234<br>32675 567<br>123<br>345<br>To be calculated<br>124<br>123<br>To be calculated<br>125<br>298<br>To be calculated<br>where<br>int MeterNo[3] represents the meter number.<br>double KillowattHours[3] represents the meter reading in kWh.<br>double ÇurrentReading[3] represents the current meter reading.<br>double PrevieusBeading[3] represents the previous meter reading.<br>double ElectricityTotal[3] represents the total meter reading.<br>Write a function read that reads the electricity information (Meter No, KillowattHours,<br>Current Reading, and Previous Reading) from the user input and stores them in the<br>different arrays. Update your main function to call the function read.<br>a.<br>Function prototype:<br>void read(int meterNo[], double killowattHours[], double<br>currentReading[], double previousReading, int size)<br>b. Write a function totals that calculates the total price in AED per meter and saves<br>them into the ElectricityTotal array, where Customer pay 8.29 fils per kWh. You<br>may use this equation to calculate the total:<br>Total = (currentReading-previousReading)* (fils per kWh)<br>Update the main function to call the function totals.<br>Function prototype:<br>void totals(double currentReading[], double previousReading[],<br>double ElectricityTotal[], int size)<br>c. Write a function sort that sorts users' information in descending order based on the<br>total value, as follows: (No need to print the info on the screen)<br>

Extracted text: Write a C+ program that helps the electricity company to manage users’ electricity information. You need to define 5 1D arrays to save users' info, as follows: CurrentReading PreviousReading ElectricityTotal(AED) MeterNo kWh 64560 | 665 15677 | 234 32675 567 123 345 To be calculated 124 123 To be calculated 125 298 To be calculated where int MeterNo[3] represents the meter number. double KillowattHours[3] represents the meter reading in kWh. double ÇurrentReading[3] represents the current meter reading. double PrevieusBeading[3] represents the previous meter reading. double ElectricityTotal[3] represents the total meter reading. Write a function read that reads the electricity information (Meter No, KillowattHours, Current Reading, and Previous Reading) from the user input and stores them in the different arrays. Update your main function to call the function read. a. Function prototype: void read(int meterNo[], double killowattHours[], double currentReading[], double previousReading, int size) b. Write a function totals that calculates the total price in AED per meter and saves them into the ElectricityTotal array, where Customer pay 8.29 fils per kWh. You may use this equation to calculate the total: Total = (currentReading-previousReading)* (fils per kWh) Update the main function to call the function totals. Function prototype: void totals(double currentReading[], double previousReading[], double ElectricityTotal[], int size) c. Write a function sort that sorts users' information in descending order based on the total value, as follows: (No need to print the info on the screen)
Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here