Arduino Piano using switch case

for a school project, we are supposed to be making a keyboard where the user types in a note and the piezo plays it, and our one requirement is it must use switch cases. I've written most of the code, however when the user types in the note, the piezo doesn't make a sound. I know it works and isn't just the setup because I've tested it with the circuit 9 code Arduino already provides. Can someone please help me with it?

const int buzzerPin = 3;
const int duration = 200;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(buzzerPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  char note;

  Serial.println("What note do you want to play?");
  while(Serial.available()==0) 
  { } // Loop here until there is a character in the serial monitor
  note = Serial.parseInt();

  switch(note) {
    case 'q':
      tone(buzzerPin, frequency('q'), duration);
      delay(duration); 
    break;

    case 'w':
      tone(buzzerPin, frequency('w'), duration);
      delay(duration); 
    break;

    case 'e':
      tone(buzzerPin, frequency('e'), duration);
      delay(duration); 
    break;

    case 'r':
      tone(buzzerPin, frequency('r'), duration);
      delay(duration); 
    break;

    case 't':
      tone(buzzerPin, frequency('t'), duration);
      delay(duration); 
    break;

    case 'y':
      tone(buzzerPin, frequency('y'), duration);
      delay(duration); 
    break;

    case 'u':
      tone(buzzerPin, frequency('u'), duration);
      delay(duration); 
    break;

    case 'i':
      tone(buzzerPin, frequency('i'), duration);
      delay(duration); 
    break;
  }
}


int frequency(char note) 
{
  // This function takes a note character (a-g), and returns the
  // corresponding frequency in Hz for the tone() function.
  
  int i;
  const int numNotes = 8;  // number of notes we're storing

  char names[] = { 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i' };
  int frequencies[] = {262, 294, 330, 349, 392, 440, 494, 523};
  
  
  for (i = 0; i < numNotes; i++)  // Step through the notes
  {
    if (names[i] == note)         // Is this the one?
    {
      return(frequencies[i]);     // Yes! Return the frequency
    }
  }
  return(0);
}
  note = Serial.parseInt();

  switch(note) {
    case 'q':

note is an int but your switch/case uses a char

Need I say more ?

If you intend to read chars from Serial then using parseInt() is not a good idea. The hint is in the name. Int as in integer as in a number.

Steve