Main Assignment:

Imagine you are writing a simplified program to evaluate Medicare reimbursement data. Hospitals/Medical Centers conduct many outpatient procedures which they then bill Medicare for. Medicare however only pays a percent of the what the hospital/medical center bills. To quickly make sense of these large numbers, you want to provide an interface that will allow the user to quickly count Medicare reimbursement records that meet certain threshold criteria. We are still a bit away from being able to do the full job, so pay attention to what I'm asking for. Also note that you will need to gain an understanding of the provided MedicarePayment class. The provided class will be in a zip file on Canvas, along with documentation for the class. A quick introduction is included below. You will need to

  • declare an ArrayList (of MedicarePayments) object as an instance variable in your GUI class so that it is available from all of your buttons (and from start up code). You should also instantiate it as an empty ArrayList (of MedicarePayments) when you create it.
  • Write a method (general in your GUI class) to read info from a file, creating MedicarePayment objects and adding them to the ArrayList. Please see hints and details below.
  • Call that method upon start up (after GUI components are initialized), so no buttons have to be clicked in order for Medicare payment information to be available.

You should create buttons in your GUI to:

  • Determine how many payments meet a given percentage reimbursement threshold (that reimbursement percentage or higher). Get the given threshold from the user via a text field.
  • Determine the number of payments meeting a given number of outpatient services threshold (that outpatient services number or greater). Get the given threshold from the user via a text field.
  • Determine how many payment records meet both a given percentage reimbursement threshold and a given outpatient services threshold (given values or higher). Get the given thresholds from the user via text fields.
  • Determine how high a percent reimbursement needs to be in order to get the percent of payment records below a given threshold (entered as a decimal please! - i.e. 20% is expressed as 0.20). Get the given percent threshold from the user via a text field.
  • Quit

Background Knowledge:

  • Reimbursement percentages can run anywhere from 0 to 100%
  • Assume for testing purposes that number of outpatient services can run anywhere from 0 to 1000
  • The file with Medicare records (MedicareData.txt) is contained in the project .zip file in Canvas. The number of records in the file is 2,595. There is a second Medicare records file (MedicareDataTest.txt) that is also in the .zip file. This second file contains only 20 records. You should use this second file to simplify your testing and debugging as it has so few records. You should familiarize yourself with these 20 records. As a general rule of thumb, you should also check that data from the first record and last record is handled appropriately, as handling these unique conditions are often where problems arise.
  • Percentages should entered as a decimal range from 0.00 (0%) to 1.00 (100%)

User Interface:

  • Don't worry too much about making the interface nice. See my simple sample interface below - Dont let that constrain your creativity. Use it to help understand what I see as inputs and outputs.
  • If you prefer to display answers in the form itself instead of using message boxes, feel free to do so.
  • Outputs which are percents should be displayed(formatted) as percents, with a reasonable number of decimal places.
  • Help me grade - DO put your name on the GUI form as a label.

Task Details:

  • Make sure you read the documentation on the MedicarePayment class. Javadoc documents can be found in Canvas.
  • Feel free to take the expedient path and just include your GUI class file and the MedicarePayment class fill in the same project/package. It's not what you will be wanting to do for later bigger projects, but for getting started
  • You probably have to get the reading from a file to work before you can test any other part of your program. There are lots thousands of records in the actual file you need to use. You might want to use a file with only 3 or 4 records until you have the file reading part debugged.
  • The file contains one line for every Medicare payment. If you read in a line at a time you are well on your way to creating the ArrayList of medicare payments. There is a MedicarePayment constructor that will be very valuable for creating an object from a string, so consider using it.
  • In reading the file, catch exceptions involving the file not being found and display an error message.
  • We're no longer going to assume that the user of the application enters valid and reasonable values. Ensure that the values entered are reasonable values when relevant buttons are clicked.
    • This does not have to be done via looping (as we may have done in class). In an event-driven world - you can display a one-time message and simply give control back to the user.
    • See background knowledge above for reasonable values.
  • Don't try to calculate anything if the inputs are bad - only display a message and let the user back into control.
  • If the user enters letters instead of numbers in text fields, the parse commands will crash. We're still going to ignore these types of problems. (No need to catch and complain about this).
  • Use any kind of loop that works for you for looping through the ArrayList of Applicants. I suggest a "foreach" though..
  • If you know total number of records, and you are given a reimbursement threshold (representing the lowest acceptable reimbursement rate) you can determine how many records (and so percentage of total records) that meet the threshold. Now think of figuring out the percent of records threshold (right side of screen) as just the opposite
    • Given the percentage of total records you wish to select, determine the minimum reimbursement threshhold that will return that percentage of total records
    • For looping through possible minimum reimbursement thresholds, start with 0.01 and increment for each iteration by 0.01, until you reach a threshold that returns the percentage of total records you wish to select (aka the value from the screen textbox)
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.