Question: help finish method in java / * * * Removes the candidate matching the provided candidate exactly from the election's list of * candidates *

help finish method in java
/**
* Removes the candidate matching the provided candidate exactly from the election's list of
* candidates
*
* @param candidate
*
* Throws:
* IllegalStateException - if you try to remove from an empty candidates list
* NoSuchElementException - if the given Candidate is not present in this election's list of
* candidates
*/
public void removeCandidate(Candidate candidate){
if (candidates.equals(candidate)){
candidate = null;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!