Another question, I mentioned earlier that I will have to set up quartars (for a year)
I plan to have each quarter as follows
Quarter 1. January, Febuary, March
Quarter 2. April, May, June
Quarter 3. July, August, September
Quarter 4. October, Novemeber, December
Is there anyway to use a CASE like statement similiar to the one in offer in VB. Each month will have different dates, what could be the best way to compare todays date with each of the quarters, for example the end of the last quarter is Decemeber 31st, one of the conditions in this assignment is to calculate a bill based on the meter reading and apply discounts and chares as appropriate. I have little Java experience but I am an accomplished programmer in other fields, but I am finding it hard to think of how to create these Case statements (or whatever the Java alternate is)
Below is the problem outlined
Outline of the problem
As an employee of a software company, you have been asked to develop an electronic billing system. The system will be part of a web site of a privet company that provides electricity to the customers. The idea is to reduce cost by providing online billing system which will replace existing pay by phone system. Online system will also reduce the time customer spends to make a payment. The payment process gets delayed due to calling centres being busy most of the time.
Your job as a programmer is to write a program in Java that will allow a customer to make a payment online.
This means that your program must calculate customer’s electricity bill.
A bill includes a quarterly £20 charge plus a consumption (use) charge of £0.07 per unit.
Consumption is calculated from meter readings taken recently and at the end of the previous quarter (a customer is expected to enter this data).
The payment should be made within fifteen days of the end of present quarter.
Every payment must be checked for late payment and a £10 fee should be added for overdue payment.
A discount of 10% will be applied to all customers who pay their bills within seven days of the end of the present quarter.
You are also required to log the time a customer spends to make a payment. Customer should be able to request a report about the payment, which should be in a printable format.
The company accountant should be able to view the same report.