|
| 1 | +You have to create a LESCO billing system using java and file I/O. To implement the system, you have to |
| 2 | +implement following requirements |
| 3 | + |
| 4 | + |
| 5 | +1. The LESCO billing system shall maintain records of usernames and passwords of LESCO |
| 6 | +employees. This information can be kept in a file with name EmployeesData. The |
| 7 | +Employeesdata file shall have one row for each employee, in each row there are two comma |
| 8 | +separated values, the first value is username and the second value is password. Usernames |
| 9 | +shall be unique (i.e. no two rows will have the same username appearing in them). |
| 10 | +Employees can change their passwords by providing their username and current password. |
| 11 | + |
| 12 | +2. The LESCO billing system shall maintain record of customer information in a file named |
| 13 | +CustomerInfo. The CustomersInfo file shall save the information such as a unique 4 digit |
| 14 | +customer id (generated by the system), customer's CNIC number (13 digit number provided |
| 15 | +by the customer without dashes), Customer name, Address, Phone number, Customer Type |
| 16 | +(commercial or domestic), meter type (Single Phase or Three Phase), Connection Date, |
| 17 | +Regular Units Consumed, Peak Hour Units Consumed. All these fields will be comma |
| 18 | +separated. Customer id and CNIC number may serve as username and password for the |
| 19 | +LESCO customers respectively. The Regular Units Consumed field corresponds to the meter |
| 20 | +reading for which the customer has paid the bill. In other words this field represents the |
| 21 | +units consumed (for both types of meters) and paid for at a given time. It is set to zero when |
| 22 | +a new meter is installed and a row is added in the CustomersInfo file. Then this field is |
| 23 | +updated whenever a bill is paid (its status is set to paid by the LESCO employees). The Peak |
| 24 | +Hours Units Consumed is also similar to the Regular Units Consumed but it is set for 3-phase |
| 25 | +meters only. For the 1-phase meters, it is kept blank. These two fields will be used to |
| 26 | +calculate the number of units consumed in a particular month. |
| 27 | + |
| 28 | + |
| 29 | +3. The LESCO billing system shall maintain record of billing information in a file named |
| 30 | +BillingInfo. The BillingInfo file shall store information such as 4 digit customer id (borrowed |
| 31 | +from the CustomersInfo file), Billing month, Current Meter Reading Regular, Current Meter |
| 32 | +Reading Peak, Reading Entry Date in format DD/MM/YYYY (cannot be in future, consider it |
| 33 | +to be issue date of the bill), Cost of electricity, Sales Tax Amount, Fixed Charges, Total Billing |
| 34 | +amount, Due Date in format DD/MM/YYYY (7 calendar days after the entry of Current Meter |
| 35 | +Reading), Bill Paid Status (Paid or Unpaid), Bill payment Date in format DD/MM/YYYY |
| 36 | +(cannot be before Reading Entry Date). There will be a new row for each meter customer |
| 37 | +every month in this file. For single phase meters, the unit price of electricity is 5 rupees per |
| 38 | +unit for domestic customers and 15 rupees per unit for the commercial customers. For three |
| 39 | +phase meters two meter readings are stored and for the regular units the price is 8 rupees |
| 40 | +per unit and for peak hours the price is 12 rupees per unit for domestic customers. For |
| 41 | +commercial customers the unit price is 18 rupees and 25 rupees per unit in regular and peak |
| 42 | +hours respectively. For the 1-phase meters and the off-peak units in 3-phase meters the |
| 43 | +number of units consumed can be calculated by subtracting the Regular Units Consumed |
| 44 | +(mentioned in file CustomerInfo) from the Current Meter Reading Regular. For calculation |
| 45 | +about the peak hours units subtract the Peak Hours Units from Current Meter Reading Peak. |
| 46 | + |
| 47 | +4. The LESCO billing system shall maintain the information about the sales tax, fixed charges |
| 48 | +and the per unit tariff TariffTaxInfo file. This file shall have 4 rows only. The first row keeps |
| 49 | +tariff and tax information about domestic customers with 1-phase meter. The second row |
| 50 | +keeps tariff and tax information about the commercial customers with 1-phase meter. The |
| 51 | +third row keeps tariff and tax information about domestic customers with 3-phase meter. |
| 52 | +The fourth row keeps tariff and tax information about the commercial customers with 3- |
| 53 | +phase meter. Sample entries are as follows: |
| 54 | +1Phase,5,,17,150 |
| 55 | +1Phase,15,,20,250 |
| 56 | +3Phase,8,12,17,150 |
| 57 | +3Phase,18,25,20,250 |
| 58 | +The entries in a row correspond to the meter type, regular unit price, peak hour unit price |
| 59 | +(left blank for 1-phase meters in the first 2 rows), the percentage of tax (for example 17 |
| 60 | +percent of the cost of electricity), fixed charges. |
| 61 | + |
| 62 | + |
| 63 | +5. The LESCO billing system shall allow the LESCO employees with valid username and |
| 64 | +password (after login) to add or update an entry (or row) in the files CustomerInfo and |
| 65 | +BillingInfo. The employees will add a row in CustomerInfo file whenever a new meter is |
| 66 | +installed for a customer. The system shall not allow more than 3 meters against a CNIC. If |
| 67 | +an employee tries to enter more than 3 meters for a CNIC, the shall disallow the action and |
| 68 | +display an error message stating "Not Allowed! Maximum 3 meters allowed per CNIC.". The |
| 69 | +system has access to NADRADB file which stores three comma separated values for each |
| 70 | +CNIC: CNIC Number (13 digit without dashes), Issuance Date (format DD/MM/YYYY), Expiry |
| 71 | +Date (format DD/MM/YYYY). The NADRADB file shall have multiple records (one for each |
| 72 | +person with a CNIC) |
| 73 | + |
| 74 | +6. The employees will add a row in BillingInfo every month when the meter reading needs to |
| 75 | +be entered in the system. The employees will update the Bill Paid Status field in the |
| 76 | +BillingInfo file once they receive offline information about payment against a bill. Once this |
| 77 | +information is changed, the system shall automatically update the Total Units Consumed |
| 78 | +field in the file CustomersInfo file to Current Meter Reading. |
| 79 | + |
| 80 | + |
| 81 | +7. The LESCO billing system shall allow the LESCO employees with valid username and |
| 82 | +password (after login) to add or update entries in the TariffTaxInfo file. The system shall |
| 83 | +make sure that exactly 4 rows exist in this file. The employees can update the tariff, tax etc. |
| 84 | +whenever they find it appropriate. |
| 85 | + |
| 86 | +8. The LESCO billing system shall allow the LESCO employees with valid username and |
| 87 | +password (after login) to view any bill after providing its 4 digit customer id. |
| 88 | + |
| 89 | +9. The LESCO billing system shall allow the LESCO customers to view their current bill. The |
| 90 | +customers need to provide their 4-digit customer id, their CNIC number, their meter type |
| 91 | +(1-phase or 3-phase), and their current meter reading(s). The bill should separately show |
| 92 | +the cost of electricity, tax, and the fixed charges. The same bill should also show the total |
| 93 | +amount due and the due date of the bill. In addition, the bill payment status should also be |
| 94 | +shown on the bill (as per the records in the relevant LESCO files). The bill should display the |
| 95 | +customer id, customer name, address, phone number, customer type, meter type, and tariff |
| 96 | +also. This bill needs not be saved in any file. It is used for view purpose only. |
| 97 | +10. The LESCO billing system shall allow the LESCO employees with valid username and |
| 98 | +password (after login) to view reports of paid and unpaid bills. The report shall only show |
| 99 | +the amount of unpaid bills so far and the amount of paid bills so far. |
| 100 | + |
| 101 | +11. The LESCO billing system shall allow the LESCO employees with valid username and |
| 102 | +password (after login) to view reports of customers whose CNIC is about to expire in next |
| 103 | +30 days. The system shall lookup the NADRADB file to know the expiry dates of CNICs. |
| 104 | +12. The LESCO billing system shall allow the LESCO customers to update the expiry date of their |
| 105 | +own CNIC mentioned in NADRADB file. The system shall require the customers to enter their |
| 106 | +CNIC number and customer number before they can update the expiry date. |
0 commit comments