fprintf(' Let''s get started! \n');
ModSelection = input(' Would you like to sign in as a User or Administrator? ','s');
while strcmpi(ModSelection ,'User') ~=1 && strcmpi(ModSelection ,'Administrator') ~=1
fprintf(' You have selected a not existing option. \n');
ModSelection = input(' Are you a User or an Administrator ','s');
if strcmpi(ModSelection ,'Administrator')
fprintf(' Welcome to the MusicLive hardcore. \n');
OptSelection = input(' Wound you like to Add, Delete, or Edit a song? ', 's');
while strcmpi(OptSelection,'Add') ~=1 && strcmpi(OptSelection,'Delete') ~=1 ...
&& strcmpi(OptSelection,'Edit') ~=1
fprintf(' You have selected a not existing option \n');
OptSelection = input(' Selected a valid option ','s');
if strcmpi(OptSelection,"Add")
SongName = input(" What is the song's name? ",'s');
fprintf(' Invalid name, enter a name with only alphabetical characters \n');
SongName = input(" What is the song's name? ",'s');
fprintf(" The name of the new songs was entered correctly \n");
SongSinger = input(' Who is the song''s singer ','s');
while isempty(SongSinger)
fprintf(' Invalid name, enter a name with only alphabetical characters \n');
SongSinger= input(" How is the song''s singer ",'s');
fprintf(" The singer of the new songs was entered correctly \n");
SongTime = input(" What is the song's length in minutes (round to the nearest whole number)? ");
while isempty(SongTime) || SongTime < 0
fprintf(' Error, the value entered is incorrect \n');
SongTime = input(' Please, enter a whole number ');
SongTime = "IntermediateOpt";
fprintf(' The new song time was entered successfully. \n');
fprintf(" Enter the song genre. \n");
fprintf(" The three options for the song's genre are Rock, Pop, and Country. \n");
SongGenre = input(" What is the song's genre? ",'s');
while strcmpi(SongGenre,'Rock') ~=1 && strcmpi(SongGenre,'Pop') ~=1 ...
&& strcmpi(SongGenre,'Country') ~=1
fprintf(' You have selected a not existing option \n');
fprintf(' Selected Rock, Pop, or Country. \n');
SongGenre = input(' Selected the correct option ','s');
fprintf(' The new song genre was entered successfully. \n');
fprintf(" The genre of the new songs was entered correctly. \n");
fprintf(" The three options for the song's language are English, Italian, and Romanian. \n");
SongLanguage = input(" What is the language of the song? ", 's');
while strcmpi(SongLanguage,'English') ~=1 && strcmpi(SongLanguage,'Italian') ~=1 ...
&& strcmpi(SongLanguage,'Romanian') ~=1
fprintf(' You have selected a not existing option NERD!!! \n');
fprintf(' Selected English, Italian, or Romanian. \n');
SongLanguage = input(' Selected the correct option ','s');
fprintf(' The new song language was entered successfully. \n');
fprintf(' The song name is %s \n', SongName);
fprintf(' The song singer is %s \n', SongSinger);
fprintf(' The song time is %s \n', SongTime);
fprintf(' The song genre is %s \n', SongGenre);
fprintf(' The song language is %s \n', SongLanguage);
fprintf(' Select Yes if desired to save the changes; if not select No \n');
RepreProcessA = input(' Yes or No ','s' );
while strcmpi(RepreProcessA, 'No') ~= 1 && strcmpi(RepreProcessA, 'Yes') ~= 1
fprintf(' Select Yes or No NERD!!! \n');
RepreProcessA = input(' Selected Yes if desired to save the changes; if not selected No ','s');
NewData = [{SongName}, {SongSinger} {SongTime}, {SongGenre}, {SongLanguage}];
writecell(NewData,'Music_Database.xlsx','WriteMode','append')
fprintf(' Song saved succesfully!\n');
fprintf( 'Would you like to exit or return to the menu?\n ');
ExitSelection = input( 'Exit or Return? ','s' );
while strcmpi(ExitSelection,'Exit') ~=1 && strcmpi(ExitSelection,'Return') ~=1
fprintf(' You have selected a not existing option \n');
ExitSelection = input(' Selected a valid option ','s');
if strcmpi(ExitSelection,"Exit")
fprintf( 'Exiting...\n' );
fprintf( 'Returning...\n' );