Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USING JAVA A PENALTY OF 1 MARK WILL BE APPLIED FOR ANY OF THE FOLLOWING: Failure to declare attributes as private Failure to spell method
USING JAVA
A PENALTY OF 1 MARK WILL BE APPLIED FOR ANY OF THE FOLLOWING: Failure to declare attributes as private Failure to spell method names as specified Writing public methods other than those specified. **LAB EXERCISES ** You are required to complete a partially written Java class that is expected to represent an Assign Plan. Your expected tasks are: 1. Create accessor methods for the private variables numOutstanding, numComplete, totalPoints, hoursAvailable, highestPriorityltem. Note the accessor for the highestPriorityltem will returns "NONE" if there is none has been set. 2. Create an alternative constructor that accepts and sets numOutstanding, numComplete, totalPoints, and highestPriorityltem. 3. Implement a mutator function to set highestPriorityltem. 4. 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) estScore=0.1*(effort*difficulty+ (effort *resources) 12/(TVdifficulty) (NOTE:::You should use the Pl function that is found inside the Math library) c.The Assignment has acccessors for all private attributes 5. 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
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