Your task is to implement a class for analyzing vowels and consonants in a sentence. The constructor of this class has a String parameter, which contains all the words in a sentence: just a string of words, separated by single spaces. You may assume that all punctuation has been removed from the String parameter.

For example, consider a sentence constructed from the string "Now is the time".

Complete the following file:

public class Sentence { private String text; /** Constructs a sentence. @param words the words in the sentence */ public Sentence(String words) { // your work here } /** Count the number of spaces in the sentence. @return number of spaces */ public int numSpaces() { // your work here } /** Count the number of vowels in the sentence. @return number of vowels */ public int numVowels() { // your work here } /** Get the number of consonants in the sentence. @return the number of consonants */ public int numCons() { return text.length() - this.numSpaces() - this.numVowels(); } /** Get the ratio of vowels to consonants for words in the sentence. @return the ratio of vowels to consonants */ public double ratioVowelsToCons() { // your work here } // This method is used for checking your work. Do not modify it public static String check(String aSent) { Sentence aSentence = new Sentence(aSent); return String.format("%4.2f",aSentence.ratioVowelsToCons()); } }