Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

public class LibrariesLecture3{ // 5 points static int Q1(String word1, String w

ID: 3808663 • Letter: P

Question

public class LibrariesLecture3{


    // 5 points
    static int Q1(String word1, String word2) {
        // return the number of rhyming syllables between the two input words. We will define nthe number of rhyming
        // syllables as the number of syllables in the largest matching suffix of sounds between the words. This
        // is the same definition used by the provided library.
        //
        // Note: The cse115 library has been included in this project, but none of the classes have been imported.


        return 0;
    }


    public static void main(String[] args) {

    }

}

package cse115.words;

import java.io.*;
import java.util.*;

public class Words{

    private static final String DIRECTORY = "/data/";
    private static final String DICTIONARY_FILENAME = DIRECTORY + "cmudict-0.7b";
    private static final String ADJECTIVES_FILENAME = DIRECTORY + "index.adj";
    private static final String ADVERBS_FILENAME = DIRECTORY + "index.adv";
    private static final String NOUNS_FILENAME = DIRECTORY + "index.noun";
    private static final String SENSES_FILENAME = DIRECTORY + "index.sense";
    private static final String VERB_FILENAME = DIRECTORY + "index.verb";

    private static Map<String, List<String>> dictionary = null;
    private static Map<String, Set<String>> partOfSpeech = null;


    /**
     * Return the number of syllables in the input word.
     */
    public static int numberOfSyllables(String word){
        int syllables = 0;
        List<String> sounds = Words.wordsToSounds(word);
        if(sounds == null){
            return syllables;
        }
        for(String sound : sounds){
            if(Words.isVowel(sound)){
                syllables++;
            }
        }
        return syllables;

    }

Explanation / Answer

Question is insufficient and the program didn't get any output bcuz

Main method did not have any instructions in it..

So whenever the program is executed the program will first reaches the main method then due to lack of instructions in it the program will end as soon as the program start executed.

And the program uses the "cse115.words" package we didn't know what is inside that package

Thanks and regards