hbarton2 / cscd350-f24-UnhandledExceptions

0 stars 0 forks source link

Feature rename class #34

Closed Lantzer closed 2 weeks ago

Lantzer commented 2 weeks ago

Added helper methods for checking availability of classItems:

checkValidNewName - returns true when the proposed new name is not already in use in the HashMap.

checkValidOldName - returns true when the class to be renamed exists in the HashMap

private setClassItemName - private so that we require any name changes go through the condition checking in renameClassItem.

renameClassItem - does basic precondition checking to ensure input is valid (non-null, non-blank strings), then checks validness of class to be renamed, and proposed new name, if both true we rename classItem and display success message. if false, error messages are displayed from helper methods.