Question
- this is a JAVA Program Create accessor methods for the private variables numAssignments, numComplete, totalPoints, hoursAvailable and highestPriorityItem. Create an alternative constructor that accepts
- this is a JAVA Program
Create accessor methods for the private variables numAssignments, numComplete, totalPoints, hoursAvailable and highestPriorityItem.
Create an alternative constructor that accepts and sets numAssignments, numComplete, totalPoints, and highestPriorityItem.
Implement a mutator function to set highestPriorityItem
Implement a class to represent an Assignment. i. The Assignment class will privately store information on it's name(String), effort (hours required to complete)(int), the number of resources to be referenced (int), the estimated difficulty(int), and the expected score(double). ii. Create a constructor for a Assignment, that accepts the effort, resources and difficulty. The constructor then evaluates and stores the cost of an assignment, using the formula below, which was supplied by a well paid consultant. (If the formula isunclear, look at the associated PDF which should have a nicer rendering)
= . ( + ( )^/(*) ) (Note: Use the PI attribute of the Math class
c.The Assignment has acccessors for all private attributes
Complete the getUrgentAssignment method of the AssignPlan object so that it
a. Creates an Assignment with knowledge of it's name, difficulty, resources and effort
b. Set's the name of the highest priority item to the new assignment
c. Increments the number of outstanding assignments, as well as the number of completed assignments by 1
d. Update the hoursAvailable by subtracting the effortHours (NOTE!!! A full implementation would test if there were sufficient hours available, but you may ignore that concern for this lab)
e. Update the total points by adding the score calculated on the assignment .
Input Format
Not relevant to solving problems
Constraints
t<=5
Output Format
.
Sample Input 0
1 10 0
Sample Output 0
====================== -----TODAY'S PLAN----- ---------------------- Priority: Assignments:10 Completed:0 Hours Avail:0 Tot. Points:0.0
Sample Input 1
1 EasyCheesy 10 20 12 50 0
Sample Output 1
====================== -----TODAY'S PLAN----- ---------------------- Priority:EasyCheesy Assignments:10 Completed:20 Hours Avail:12 Tot. Points:50.0
Sample Input 2
1 EasyCheesy 10 20 12 50 Getting_interesting 0
Sample Output 2
====================== -----TODAY'S PLAN----- ---------------------- Priority:Getting_interesting Assignments:10 Completed:20 Hours Avail:12 Tot. Points:50.0
Sample Input 3
1 EasyCheesy 10 20 12 50 1 A_Wha_Dis??? 0 0 1
Sample Output 3
====================== -----TODAY'S PLAN----- ---------------------- Priority:A_Wha_Dis??? Assignments:11 Completed:21 Hours Avail:12 Tot. Points:50.0
Sample Input 4
1 EasyCheesy 10 20 12 50 2 A_Wha_Dis??? 2 0 1 Sas_Crise_Mi_A_Ded!!! 3 0 1
Sample Output 4
====================== -----TODAY'S PLAN----- ---------------------- Priority:Sas_Crise_Mi_A_Ded!!! Assignments:12 Completed:22 Hours Avail:7 Tot. Points:50.5
Sample Input 5
1 EasyCheesy 10 20 12 50 3 A_Wha_Dis??? 2 2 1 Sas_Crise_Mi_A_Ded!!! 3 3 1 Ow_Im_Suh_Wikid?!?! 4 2 5
Sample Output 5
====================== -----TODAY'S PLAN----- ---------------------- Priority:Ow_Im_Suh_Wikid?!?! Assignments:13 Completed:23 Hours Avail:3 Tot. Points:56.5
Contest ends in 6 days
Submissions:
7
Max Score:
50
Difficulty:
Medium
Rate This Challenge:
More
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started