You can must Java for this programming assignment. You can use your choice of IDE. What to submit:
You can must Java for this programming assignment. You can use your choice of IDE.
What to submit:
Submit your completed code (no test case needed).
Note that it is your responsibility to make sure that your code runs successfully and you provide clear instructions for doing so. You will not get points if we cannot run your code. Also, for full credit, your code should be well-documented with comments.
Optimal Resource Allocation for Maximum Profit
BACKGROUND:
In many industries, a common problem is how to allocate resources optimally to various tasks or projects to maximize profit. Consider a construction company that has a limited number of workers and several projects to complete. Each project has a deadline and a profit that it will yield if completed by its deadline. Workers can only work on one project at a time. The company wants to maximize its total profit by assigning workers to projects in an optimal way.
PROBLEM STATEMENT:
You are given n projects, each with a profit and a deadline by which it must be completed to earn that profit. You have m workers. Each worker can work on only one project at a time and will take exactly one day to complete any project. Design a program that determines the maximum total profit that can be earned given that all projects are completed by their deadlines. If a project is not completed by its deadline, no profit is earned for that project.
REQUIREMENTS:
Classes to Implement:
Project: A class representing a project with properties:
int id: A unique identifier for the project.
int profit: The profit earned if the project is completed on time.
int deadline: The last day by which the project must be completed to earn the profit.
ResourceAllocator: A class that implements the dynamic programming solution to allocate resources (workers) to projects.
Dynamic Programming Approach:
Implement a method int maxProfit(List<Project> projects, int workers) that calculates the maximum total profit.
You must use dynamic programming to ensure that your solution is efficient for a large number of projects.
Constraints:
All profits and deadlines are positive integers.
Projects can only be assigned to one worker and cannot be split between days or workers.
Test Cases:
Your submission must include a main method that demonstrates your solution with at least three test cases.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.