Note To Faculty: Read And Update The Week Two J
Note To Faculty Read And Update Thebelowmodifythe Week Two Java App
Note to Faculty: Read and update the below. Modify the Week Two Java™ application using Java™ NetBeans™ IDE to meet these additional and changed business requirements: The company has recently changed its total annual compensation policy to improve sales. A salesperson will continue to earn a fixed salary of > . The current sales target for every salesperson is . The sales incentive will only start when 80% of the sales target is met.
The current commission is of total sales. If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is . The application should ask the user to enter annual sales, and it should display the total annual compensation. The application should also display a table of potential total annual compensation that the salesperson could have earned, in $5000 increments above the salesperson’s annual sales, until it reaches 50% above the salesperson’s annual sales.
Sample Table: Assuming a total annual sales of $100,000, the table would look like this: Total Sales Total Compensation 100,000 105,000 110,000 115,000 120,000 125,000 130,000 135,000 140,000 145,000 150,000 The Java™ application should also meet these technical requirements: The application should have at least one class, in addition to the application’s controlling class. The source code must demonstrate the use of conditional and looping structures. There should be proper documentation in the source code. Submit a ZIP file containing the ".java" file.
Paper For Above instruction
Note To Faculty Read And Update Thebelowmodifythe Week Two Java App
The task involves modifying an existing Java application developed in NetBeans to reflect updated business rules regarding sales compensation and incentive calculations. The key updates include implementing a new sales target, an incentive initiation threshold, and dynamic compensation calculations based on exceeding the sales target with an acceleration factor.
The core functionalities of the application include prompting the user for the annual sales amount, calculating total compensation based on fixed salary, commissions, and incentives, and generating a table of potential compensations at incremental sales levels. The table should illustrate compensation at increments of $5000 above the current sales, up to 50% beyond the current sales figure.
Specifically, the updated application will incorporate:
- A fixed base salary, which remains constant for all salespersons.
- A specified sales target (e.g., $120,000), which should be parameterized for easy updates.
- An incentive threshold at 80% of the sales target; incentives only accrue beyond this point.
- A commission rate that applies to total sales, with an increased rate upon surpassing the sales target, adjusted further by an acceleration factor.
- Dynamic calculation of total annual compensation, combining fixed salary, commissions, and incentives where applicable.
- A trajectory table displaying potential total compensations at sales levels incremented by $5000, starting from current sales up to 50% above
The program must leverage object-oriented principles by including at least two classes: one controlling class and an auxiliary class for calculations. Proper use of conditional and looping structures is mandatory, and the code should be well-documented with comments explaining critical logic points.
Finally, the source code should be packaged as a ZIP file containing the ".java" files for submission.
Implementation Strategy
The main class, possibly named SalesCommissionCalculator, will handle user interaction: prompting for input, displaying results, and controlling program flow. An auxiliary class, perhaps CompensationCalculator, will encapsulate the logic for calculating compensation based on sales input, including the application of thresholds, commissions, and acceleration factors.
The main steps will include:
- Defining constants for fixed salary, sales target, incentive threshold percentage, commission rates, and acceleration factor.
- Getting user input for annual sales via Scanner.
- Calculating total compensation using the auxiliary class methods.
- Generating and printing the compensation table at specified sales increments.
- Implementing conditional logic to determine whether incentives apply, and at what rates.
- Using loops to generate the table entries and perform calculations across the incremental sales levels.
Example Calculation
Assuming a fixed salary of $30,000, a sales target of $120,000, a commission rate of 5%, an acceleration factor of 2, and an incentive only when sales exceed 80% of the target, the application will perform calculations such as:
- For sales below 96,000 (80% of target), only fixed salary applies.
- For sales above 96,000, calculate commission at 5% of total sales.
- For sales exceeding $120,000, increase commission rate with the acceleration factor.
- Total annual compensation includes fixed salary plus earnings from commissions and incentives if conditions satisfy.
This approach simplifies understanding the calculations, modularizes code for scalability, and provides clear outputs for each sales scenario.
Conclusion
By adhering to these outlined modifications and programming principles, the enhanced Java application will accurately model the revised compensation structure. Proper documentation and object-oriented design will support future maintenance and scalability of the code base. Ensure the final ZIP package includes all source files with appropriate comments, demonstrating a comprehensive understanding of Java programming, conditional and loop structures, and business logic implementation.
References
- Deitel, P. J., & Deitel, H. M. (2015). Java: How to Program (10th Edition). Pearson.
- Oracle Documentation. (2023). Java Tutorials. https://docs.oracle.com/javase/tutorial/
- Gaddis, T. (2018). Starting Out with Java: From Control Structures through Data Structures. Pearson.
- Horton, I. (2016). beginning Java Programming. Wiley.
- Java SE Documentation. (2023). Oracle. https://docs.oracle.com/en/java/javase/
- Heineman, G., & Pollice, G. (2018). Object-Oriented Design and Patterns. Addison-Wesley.
- Schildt, H. (2020). Java The Complete Reference. McGraw-Hill Education.
- McGraw-Hill Education. (2018). Java Programming
- Effective Java (3rd Edition). (2018). Joshua Bloch. Addison-Wesley.
- Chapman, S. (2017). Java Programming for Beginners. Packt Publishing.