Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

USING JAVA

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

What is database?

Answered: 1 week ago

Question

What are Mergers ?

Answered: 1 week ago