for (int i = 0; i < this.str.Length; i++)
if (this.str[i] >= 'A' && this.str[i] <= 'Z')
if (this.str[i] != 'A' && this.str[i] != 'E' && this.str[i] != 'I' && this.str[i] != 'O' && this.str[i] != 'U')
else if (this.str[i] >= 'a' && this.str[i] <= 'z')
if (this.str[i] != 'a' && this.str[i] != 'e' && this.str[i] != 'i' && this.str[i] != 'o' && this.str[i] != 'u')
if (this.str[i] >= 'A' && this.str[i] <= 'Z')
if (this.str[i] == 'A' || this.str[i] == 'E' || this.str[i] == 'I' || this.str[i] == 'O' || this.str[i] == 'U')
else if (this.str[i] >= 'a' && this.str[i] <= 'z')
if (this.str[i] == 'a' || this.str[i] == 'e' || this.str[i] == 'i' || this.str[i] == 'o' || this.str[i] == 'u')
public void setString(string str)
public int getUpperCons()
public int getLowerCons()
public int getUpperVowels()
public int getLowerVowels()
public int getTotalVowels()
static void Main(string[] args)
String str = new String();
Console.WriteLine("Midterm Examination Program 1");
Console.WriteLine("Enter a string:");
str.setString(Console.ReadLine());
Console.WriteLine("Uppercase Consonants = " + str.getUpperCons());
Console.WriteLine("Lowercase Consonants = " + str.getLowerCons());
Console.WriteLine("Uppercase Vowels = " + str.getUpperVowels());
Console.WriteLine("Lowercase Vowels = " + str.getLowerVowels());
Console.WriteLine("Number of vowels = " + str.getTotalVowels());