Questions
The purpose of this problem is to gain familiarity with the dictionary ADT. A homophone is...

The purpose of this problem is to gain familiarity with the dictionary ADT. A homophone is one of two or more words that are pronounced alike but are different in meaning or spelling; for example, the words “two”, “too”, and “to”.

Write a Java program that uses one of the implementations of the dictionary interface (UALDictionary or OALDictionary on Moodle) to find the word that has the most homophones.

Do not use data structures that we have not covered so far in the course. The file “cmudict.0.7a.txt” in the Dictionaries folder on Moodle contains a pronunciation dictionary downloaded from

http://www.speech.cs.cmu.edu/cgi-bin/cmudict

The page also contains a detailed description of the pronunciation dictionary. The file consists of lines of the form

ABUNDANT AH0 B AH1 N D AH0 N T

The first string is the word, which is followed by one or more phonemes (or phones) that describe the pronunciation of the word. There are 39 phonemes occurring in North American English that are used in the dictionary. The collection of 39 symbols is known as the Arpabet, for the Advanced Research Projects Agency (ARPA), which developed it in the 1970’s in connection with research on speech understanding.

The Dictionaries directory on Moodle contains several files you can use. UALDictionary.java is a class that implements the dictionary interface using an unordered array list. The array list stores (key, value) pairs as described in the class KVpair.java. Pronunciation.java is a class that stores and manages access to a (word, phonemes) pair.

There is also a program Homophones.java that shows how you can read in the cmu dictionary (skipping comments and so on). You can modify that program so that when you read in a pronunciation entry you store it in an appropriate dictionary. Call your program MostHomophones.

The output is a first line containing a single integer n, which is the largest number of homophones. The n homophones follow on the next n lines, one word per line.

UAL Dictionary

import java.util.ArrayList;

import java.util.Collections;

class UALDictionary<Key extends Comparable, E> implements Dictionary<Key, E> {

private static final int defaultSize = 10;

private ArrayList<KVpair<Key, E>> list;

// Constructors

UALDictionary() {

this(defaultSize);

}

UALDictionary(int sz) {

list = new ArrayList<KVpair<Key, E>>(sz);

}

public void clear() {

list.clear();

}

/** Insert an element: append to list */

public void insert(Key k, E e) {

KVpair<Key, E> temp = new KVpair<Key, E>(k, e);

list.add(temp);

}

/** Remove element with key k, return element */

public E remove(Key k) {

E temp = find(k);

if (temp != null)

list.remove(new KVpair<Key, E>(k, temp));

return temp;

}

/** Remove any element */

public E removeAny() {

return list.remove(list.size()-1).value();

}

/**

* Find k using sequential search

*

* @return Record with key value k

*/

public E find(Key k) {

for (KVpair<Key, E> t : list)

if (k.compareTo(t.key())==0)

return t.value();

return null; // "k" does not appear in dictionary

}

public Iterable<E> findAll(Key k) {

ArrayList<E> al = new ArrayList<E>();

for (KVpair<Key, E> t : list)

if (k.compareTo(t.key()) == 0)

al.add(t.value());

return al;

}

public int size(){

return list.size();

}

/** Returns an iterable collection of the dictionary. */

public Iterable<E> values() {

ArrayList<E> elements = new ArrayList<E>(list.size());

for(KVpair<Key, E> t : list)

elements.add(t.value());

return elements;

}

}

Homophones.java

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

import java.util.ArrayList;

public class Homophone {

public static void main(String[] args) {

UALDictionary<String, Pronunciation> PDict = new UALDictionary<String, Pronunciation>();

File file = new File("cmudict.0.7a.txt");

  

final int len = 5; // we start with words of length 5 characters

long start = System.currentTimeMillis();

try {

Scanner scanner = new Scanner(file);

while (scanner.hasNextLine()) {

String line = scanner.nextLine();

if (line.substring(0, 3).equals(";;;"))

continue; // skip comment lines

Pronunciation p = new Pronunciation(line);

if ((p.getWord().length() < len - 1)

|| (p.getWord().length() > len))

continue;

if ((p.getWord().length() == len - 1)

|| (p.getWord().length() == len))

PDict.insert(p.getWord(), p);

}

scanner.close();

} catch (FileNotFoundException e) {

e.printStackTrace();

}

long middle = System.currentTimeMillis();

System.out.println("Loaded dictionary.");

for (Pronunciation p : PDict.values()) {

String w = p.getWord();

if (w.length() == len) {

/* Fill in code to determine if this word

is pronounced the same if we remove the

first letter or if we remove the second.

*/

}

}

long end = System.currentTimeMillis();

System.out.println("Run times: load dictionary= " + (middle - start)

+ " process= " + (end - middle) + " total= " + (end - start));

}

}

Please provide comments if possible, I will Thumbs Up for the help!

In: Computer Science

I want another 600 word discussion on 3-methyl-3-pentanol, here is the attached example if you need...

I want another 600 word discussion on 3-methyl-3-pentanol, here is the attached example if you need an idea. I don't want it to be the same.

"Discussion:

In this experiment, the 3-methyl-3-pentanol solution was being used in the dehydration process. The alcohol was a five carbons aliphatic hydrocarbon which one of the hydrogen atoms, H was substituted by one hydroxyl group, OH-. Due to the low melting point, the pentanol appear in liquid form at room temperature. The dehydration process of alcohol converted pentanol which the hydroxyl group, OH-was removed to become pentene. Pantene was a five carbons aliphatic hydrocarbon with a single double bond in the molecule. The solution was added with concentrated phosphoric acid in a 5-ml vial and was mixed together by swirling. The phosphoric acid was added as catalyze as such increased the rate of reaction in dehydration without affected the particular chemical reaction. The spin vain added into the solution in order to prevent over boiling of the solution.

The heating of mixture was carried out in a fractional distillation apparatus. As the mixture was heated, the alkene and water were produced as the products in the reaction. Besides, the side product and impurities of the reaction was being produced at the same time. The temperature of mixture when heating was fluctuated. During the temperature 80°C, the temperature of mixture dropped suddenly by 2°C and the temperature remained at 78°C constantly for few seconds. This was because some impurities or side products were being produced in the mixture which might had the boiling point of 78°C. The temperature of mixture dropped suddenly because the heat being was absorbed which used to break down the bonding of the side products. When the boiling point was reached, then temperature of mixture remained constant as the state of the side products are converted from liquid form to gaseous form. The temperature of mixture was increased until 107°C after all the side products were being converted.The temperature of mixture was reached to maximum at 107°C. This temperature was known as the activation temperature which the pentanol started to be dehydrated. In all the distillation process, some of the product was being lost since it washoled up in the apparatus which reduce the product yield. In order to maximize the yield, the mixture was continued to be heated at higher temperature range which more than the boiling point of pentanol. When the mixture was heated at 90°C-100°C, the water in the mixture pushed over the products into the receiving vial along the condenser. The products produced were collected in the same receiving vial.

Then, the receiving vial containing pentene, water and small amount of the impurities. Two layers liquid were presented in the receiving vial, one drop of distilled water was added into vial in order to determine the location of aqueous layer. Since the water droplet mixed with the lower layer, so the upper layer was determined as cloudy solution while the lower layer was aqueous layer. The upper cloudy layer was pentene with some impurities and water inside. The lower aqueous layer was removed and discarded. But, that is not easy to remove all the water in the receiving vial. So, anhydrous calcium chloride was being added. The purpose of adding of anhydrous calcium chloride was used to remove residual water in the organic solvent. It is known as drying agent in the organic solvent which are not dissolves in the solvent but drying the solvent. The calcium chloride clumped together with the water droplets as it solidified them. In another word, it reacted with water to form hydrates which was their preferred form when water was available. An excess drying agent should be used to ensure that all the water in solvent was removed. If the water remains in the materials collected, it could interfere with the analysis.Water had been successfully removed from the organic compound mixture, so it was very important to not reintroduce water into the mixture. The final distillation of unpurified 3-methyl-3-pentene must be done very carefully to obtain purified products. "

In: Chemistry

There is a new input technique for touch-screen devices that allows users to input a word by sliding a finger from letter to letter.

what is the test static? what is the critical value? what is the p value?

There is a new input technique for touch-screen devices that allows users to input a word by sliding a finger from letter to letter. The user's finger is only removed from the keyboard between words. The developers claim that typing speed using this new input technique is faster when compared with traditional touch-screen keyboards. The accompanying data table shows the typing speeds of 10 individuals who were measured typing using both methods. Complete parts (a) through (d) below.

image.png

b. Calculate the appropriate test statistic and interpret the results of the hypothesis test using α = 0.01. 

The test statistic is _______ (Round to two decimal places as needed.) 

A Typing speeds of 10 individuals Person New method Traditional 1 49 41 2 53 46 3 43 35 4 36 26 5 52 44 6 40 40 7 36 41 8 33

In: Statistics and Probability

Macroeconomic Impact on Business Operations In a 1,400-2,100-word APA-formatted analysis, discuss monetary policy and its effect...

Macroeconomic Impact on Business Operations

In a 1,400-2,100-word APA-formatted analysis, discuss monetary policy and its effect on macroeconomic factors such as GDP, unemployment, inflation, and interest rates.

a. Explain how money is created

b. What are the tools used by the Federal Reserve to control the money supply?

c. How do these tools influence the money supply and in turn affect macroeconomic factors

d. Which combinations of monetary policy help you to best achieve a balance between economic growth, low inflation, and a reasonable rate of unemployment?

In: Economics

please use word document Q3 Tanner Company's most recent contribution format income statement is presented below:...

please use word document

Q3

Tanner Company's most recent contribution format income statement is presented below:

Sales                                        $75,000

Less: Variable Expenses         $45,000

Contribution Margin               $30,000

Less: Fixed Expenses             $36,000

Operating Loss                       $(6,000)

The company sells its only product for $15 per unit. There were no beginning or ending inventories.

Required:

a) Compute the company's break-even point in units sold.
b) Compute the total variable expenses at the break-even point.
c) How many units would have to be sold to earn a target operating income of $9,000?
d) The sales manager is convinced that a $6,000 increase in the advertising budget would increase total sales by $25,000. Would you advise the increased advertising outlay?

In: Accounting

Please, Answer all parts( a,b,c,d,e) in Question 1 and step by step. Also, by word document...

Please, Answer all parts( a,b,c,d,e) in Question 1 and step by step. Also, by word document or by keyboard

2. The following data are taken from the financial market pages of an Australian newspaper.

Forward Margins

Forward Contract Forward Margins (Buy A$/Sell A$)
1 month 0/1
2 month 1/2
3 month 1/3
6 month 2/4
1 year 0/1
2 year -16/-8
3 year -51/-11

The data under the “Forward Margins” column represent the forward contracts for the US dollar with respect to the Australian dollar (given in points form).

(a) Using this data, and the bid-ask for spot USD at 0.7144 to 0.7145, compute the outright bid/ask rates for the following forward contracts:

(i) 1 month

(ii) 6 month

(iii) 2 years

(iv) 3 years

(b) Calculate the forward premium for the following contracts:

(i) 2 month

(ii) 3 month

(iii) 6 month

(iv) 1 year

c) You expect to receive US$ 70,000 in 6 months. What amount in A$ will that convert into of you use the above forward rates?

d) You need to buy US$ 500,000 in 2 years. How many A$ will you need if you use the forward rates above?

e) What do the forward rates indicate in terms of whether the A$ is expected to strengthen or weaken with respect to the US dollar?

In: Finance

Please write a 300-word essay describing a business-related problem using the information below. Think about, decide...

Please write a 300-word essay describing a business-related problem using the information below.

Think about, decide upon and describe a business-related problem you would like to resolve. The first step is to know and to clearly articulate a "Problem Statement" and a "Problem Question".The problem needs to be narrowed down to the extent resolution is possible. If problems are too general, you end up discovering all kinds of details and getting to a result, a solution, a resolution can be overwhelming. Keep it simple.

Describe in detail information about this problem, who cares about the problem, what people/roles are involved, why this problem needs to be resolved, what is the purpose of giving effort, time, and resources to address the problem.  Sometimes this process is referred to as a "Work Plan" although we will add the considerations regarding Anticipating the Audience and Issues in Step 2.

In: Operations Management

Write about Kit Kat Word count 1000-1500 words and reference Questions: Media Strategy: Identify the Brand’s...

Write about Kit Kat

Word count 1000-1500 words and reference

  1. Questions:

    1. Media Strategy: Identify the Brand’s media strategy differentiating between Paid, Own and Earned media.

    2. Media Reach and Frequency: Explain how your Brand intends to optimize its Media Reach.

    3. Media Coverage: Explain the geographic coverage used by your Brand.

    4. Media Efficiency: Based on your research of the Brand, do you think they are achieving an efficient CPM/GRP outcome?

    5. Reputation Management: Perform secondary research online to identify positive and negative reputation issues that your brand may have.

In: Operations Management

WORD BANK a. Aqueous Solutions b. Colligative Properties c. Concentrated Solution d. Dilute Solution e. Electrolytic...

WORD BANK

a. Aqueous Solutions

b. Colligative Properties

c. Concentrated Solution

d. Dilute Solution

e. Electrolytic Solution

f. Hydration

g. Immiscible

h. Insoluble

i. Miscible

j. Molality (m)

k. Molarity (M)

l. Non-electrolyte Solution

m. Osmotic Pressure

n. Osmosis

o. Percent by mass

p. Percent by volume

q. Recrystallization

r. Salvation

s. Saturated

t. Semipermeable Membrane

u. Solubility

v. Soluble

w. Solute

x. Solution

y. Solvent

z. Supersaturated Solution

aa. Unsaturated

Use the Vocabulary words above to complete the following sentences words can be used more than once, some words are not be used.

A ___________ is an intimate homogeneous mixture of a solute and a solvent.

The substance being dissolved in a solution is the __________.

The substance whose physical state is retained is the __________.

If a solute will dissolve in a given solvent it is said to be ________ in that solvent.

If the solute does not dissolve in the solvent the solute is _________.

The __________ of a substance is a measure of how much solute will dissolve in a given quantity of solvent at a specific temperature.

When two liquids dissolve in each other they are __________; if they do not, then they are ________.

A ___________ __________ is one that has a relatively large amount of solute dissolved in it.

A ___________ ___________ has a relatively small amount of solute dissolved in it.

The process by which water molecules surround the ions of the solute is called __________, for any other solvent except water the term is ________.

A solution at a given temperature that exists in dynamic equilibrium with undissolved solute is said to be ___________.

When a solution contains less solute than the solubility limit, it is said to be _____________.

A ____________ _______ contains more than the maximum amount of solute for a given temperature.

A solution containing a solute that dissociates into ions is called an __________ ___________.

A solute that dissolves into nonconductive particles is called a____________ ____________.

A common way to purify a mixture of two solids that have different solubilities is called __________.  

In: Chemistry

Credit and Insurance Instructions After reading the required resources, answer the following questions: What steps could...

Credit and Insurance

Instructions

After reading the required resources, answer the following questions:

What steps could you take to improve your credit worthiness? (Chapter 15)

Some businesses sell products and services that can injure customers. List three (3) examples and explain how these companies probably use their insurance. (Chapter 16)

Word count requirement: A minimum of 100 words is required for this discussion.

Book: Entrepreneurship and Small Business Management, 1/e Vitalsource eBook for Florida Technical College

Author: Steve Mariotti Car

In: Finance