Skip to content
GUI application displaying an ISP company's Customers and billing. Example solution for CQ University assignment
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
bin
build/classes
design
nbproject
src
.classpath
.project
build.xml
readme.md

readme.md

Objective

Develop a Java Windowed Application to simulate the logging and reporting of internet access by customers of the our Internet Service Provider.

Specifications

The required Java Windowed Application should allow the user to:

  1. Select the Customer via a selection of radio buttons. For the currently selected customer, the following details should be displayed in a series of labels:
  • Customer Name: the customer's name.
  • Internet Usage (MB): the customer's internet usage (uploads + downloads) since the last Reset. Note: 1 MB = 1024 KB = 1024 bytes.
  • Internet Usage Limit (MB): the internet usage limit (uploads + downloads) for the customer per billing period (e.g. per month). If they download less than this per month or since the last download, then they will not incur any over use charges. i.e. they will just pay the flat fee (per month). In the screen shots below, I have set this to 15,000 MB per month for all customers. You can select a different value if you want.
  • Over Limit Usage (MB): the number of MB that the customer has used in excess of the Download Limit (MB) for this billing period (e.g. for this month).
  • Total Charge (so far): this is calculated from a flat rate of $20.00 per billing period (for up to the Download Limit (MB) in downloads). If any Over Limit Usage (MB) occurs, then an additional fee is calculated at a rate per MB and added onto the Total Charge (so far). In the screen shots below, I have set this to $0.025 / MB. You can select a different value if you want.
  1. For each customer, the above data needs to be stored. Your application should cater for at least six (6) customers. For this test version of the application, please feel free to make-up the customer names.

  2. This information must be stored in an Array of Customer objects. Changing, deleting, or adding new customers should be as simple as changing an array (or a constructor) and recompiling. This is an essential design criteria for this assignment.

  3. Click the Reset Customer's Usage button or File Reset Customer's Usage menu item to reset the currently selected customer's internet usage and then update relevant label(s) to show the reset values accordingly. Note: Labels showing Customer and ISP (Internet Service Provider) totals will need to be updated. See screen shots below.

  4. Click the Reset All Customer Usage button or File Reset All Customer Usage menu item to display a Swing Confirmation Dialog to the user asking them to confirm the resetting of all customer usage. If confirmed, the internet usage details for all customers should be reset and all relevant label(s) updated to show the reset values accordingly. Note: Labels showing Customer and ISP totals will need to be updated. See screen shots below.

  5. Click the Customer Report button or File Customer Report menu item to display a simple summary report showing the Customers internet usage details and fees in a simple SWING dialog. See screen shots below.

  6. Click the ISP Report button or File ISP Report menu item to display a simple summary report showing the total internet usage details and fees for all customers in a simple SWING dialog. See screen shots below.

  7. Click the Exit button or File Exit menu item to exit the application.

  8. Click the Help About menu item to see a simple About screen. See screen shots below.

  9. In addition, two separate timers are required:

  • Date / Time Timer: One to display the date and time in a label and update this automatically every second. The date and time are also used on the various reports. See screen shots below. This timer should update every 1.0 seconds.
  • Customer Usage Timer: Another timer is required to simulate internet usage by customers. This listener should loop through all customers and increment their internet usage by a random value (a different random value for each customer). Note: Labels showing relevant Customer and ISP totals will need to be updated. See screen shots below.
  1. In addition to Customer details, your application's main screen should also show ISP totals (for all customers). These labels should be updated as customer usage occurs and after a reset. The following details should be displayed in a series of labels:
  • Internet Usage (MB): the internet usage for all customers since the last Reset.
  • Over Limit Usage (MB): the Over Limit Usage for all customers since the last Reset.
  • Total Charge (so far): the Total Charge (so far) for all customers since the last Reset.
You can’t perform that action at this time.