Scenario

You have volunteered your problem solving services to Cheery Charities, a local organization that helps charities raise money to fund projects. You have been asked to create a program to track donations made towards projects. Your application will manage only one project initially. The program must allow users to add donation amounts for the project. The sum of the projects donations cannot exceed a target amount for the project. A project may or may not have a corporate sponsor. No identifying information on the corporate sponsor is needed. If the project has a corporate sponsor, each donation amount will be doubled before it is added to the fund. The organization must be able to know how many donations were made for the project and the total amount donated.

Create a program that uses a data definition class to model one project and an accompanying implementation class that will instantiate one instance of the data definition class, using it to process donations for the project.

The data definition class must store the name of the project, the target total amount of donations desired, the actual amount of donations received, and if the project has a corporate sponsor. Additionally, the data definition class must have validating mutators for all numeric instance variables and non-validating mutators for non-numeric instance variables. Accessors must be used for all instance variables. For extensibility, a project can be created with or without knowing the target total amount of donations desired. When the target total amount is not known, it should be defaulted to $1,000.

The implementation class will instantiate an instance of the data definition class. Then the program will prompt the user for the projects name, whether or not they want to use the default target total amount, and if the project has a corporate sponsor. If the user does not want to use default target total amount, the user must be prompted to enter in their own target amount. Next, the user will be prompted to enter donation amounts. Remember, the sum of donation amounts cannot exceed the target amount for the project. In such cases, the user should be provided an error message, and be prompted for another donation amount. When the user has indicated they are finished entering donation amounts, the program will display a well-formatted summary of the project name, target total amount of donations desired, actual amount of donations received, and if the project has a corporate sponsor.

Programming Assignment 1: Solution Design

  • List and describe the purpose of each class that will be needed to solve this problem
    • You must separately identify (list) and describe the purpose of each class. One or two sentences per class should be sufficient.
  • Create a detailed UML class diagram
  • Create a defining diagram/IPO hierarchy chart detailing the implementation design
  • Create pseudocode detailing each method that will be created in the data definition and implementation classes

Programming Assignment 2: Solution Implementation

Write a well-documented, efficient Java program that implements the solution design you identified. Include appropriate documentation as identified in the documentation expectations document.

Note: You may not use the Scanner or System classes for input/output. You must use the JOptionPane class. Additionally, you may not use System.exit, or any variant that exits the program in the middle of the program. The program should only exit once the algorithm has finished completing.

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.