In JAVA (eclipse).... Extract both files and place them in your program’s folder. You will be using them. In your driver class: • Create an array called “boyNames” and store all names from the BoyNames.txt file • Similarly, create an array called “girlsNames” and store all names from the GirlNames.txt file • Create a text menu that allowing users to: 1. Enter a name and the application must display a message indicating if the name is among the most popular (found on either array) If the name is found, tell the user if it is a boy’s or girl’s name 2. Option to suggest a name. Program must suggest/display a name to the user by randomly selecting one from the appropriate array depending if the user wants a boy’s or girl’s name 3. Option to display all names starting with a specific letter. Display all names starting with a specific letter (e.g. all names starting with the letter R) depending if the user wants a boy’s or girl’s name • After a user either enters a name from (1) in the menu or is suggested a name from (2), the program must ask if the name is acceptable for the newborn or not 1. If the name is not acceptable, user must be given the option to exit the program or repeat the procedure. Either ask for a new name to search if user is in (1), or suggest a new name randomly if in (2). 2. If the name is acceptable, program must ask the user to enter the newborn’s last name and expected date of birth. 3. Then, the program must instantiate an object of the class called NewBorn using its constructor with the accepted name for the newborn, last name, and expected date of birth. 4. Finally, program must display the state of the NewBorn object
In: Computer Science
Write a class called Name. A tester program is provided in Codecheck, but there is no starting code for the Name class.
The constructor takes a String parameter representing a person's full name. A name can have multiple words, separated by single spaces. The only non-letter characters in a name will be spaces or -, but not ending with either of them.
The class has the following methods. • public String getName() Gets the name string.
• public int consonants() Gets the number of consonants in the name. A consonant is any character that is not a vowel, the space or -. For this problem assume the vowels are aeiou. Ignore case. "a" and "A" are both vowels. "b" and "B" are both consonants. You can have only one if statement in the method and the if condition cannot have either && or ||. Do not use the switch statement, which is basically the same as an if statement with multiple alternatives. Hint: call method contains().
• public String initials() Gets the initials of the name. Do not use nested loops for the method. Hint for initials(): Each word after the first is preceded by a space. You can use the String method indexOf (" ", fromIndex) to control a while loop and to determine where a new word starts. This version of indexOf() returns the index of the first space starting at the fromIndex. The call of indexOf (" ", fromIndex) returns -1 if the space is not found in the string. Remember that the name does not have 2 consecutive spaces and does not end in a space.
CODE CHECK:
public class NameTester
{
public static void main(String[] args)
{
Name name = new Name("Allison Chung");
System.out.println(name.getName());
System.out.println("Expected: Allison Chung");
System.out.println(name.consonants());
System.out.println("Expected: 8");
name = new Name("a-abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ");
System.out.println(name.getName());
System.out.println("Expected: a-abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ");
System.out.println(name.consonants());
System.out.println("Expected: 42");
name = new Name("Alhambra Cohen");
System.out.println(name.initials());
System.out.println("Expected: AC");
name = new Name("George H W Bush");
System.out.println(name.initials());
System.out.println("Expected: GHWB");
name = new Name("John Jacob Jingleheimer Schmidt");
System.out.println(name.initials());
System.out.println("Expected: JJJS");
name = new Name("Zorro");
System.out.println(name.initials());
System.out.println("Expected: Z");
}
}In: Computer Science
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In: Accounting
Scobie Company began 2016 with a retained earnings balance of $142,400. During an examination of its accounting records on December 31, 2016, Scobie found it had made the following material errors, for both financial reporting and income tax reporting, during 2015.
| 1. | Depreciation expense of $15,000 inadvertently had been recorded twice for the same machine. |
| 2. | No accrual had been made at year-end for interest; therefore, interest expense had been understated by $4,000. |
Scobie’s net income after taxes during 2016 was $60,000. The company has been subject to a 30% income tax rate for the past several years. It declared and paid dividends of $13,000 during 2016.
Required:
| 1. | Prepare whatever journal entries in 2016 are necessary to correct Scobie’s books for its previous errors. Make your corrections directly to the Retained Earnings account. |
| 2. | Prepare the statement of retained earnings for 2016. |
General Journal
Shaded cells have feedback.
Prepare whatever journal entries are necessary to correct Scobie’s books for its previous errors. Make your corrections directly to the Retained Earnings account on December 31. Additional Instructions
How does grading work?
PAGE 1
GENERAL JOURNAL
Score: 82/101
| DATE | ACCOUNT TITLE | POST. REF. | DEBIT | CREDIT | |
|---|---|---|---|---|---|
|
1 |
✔ |
✔ |
✔ |
||
|
2 |
✔ |
✔ |
|||
|
3 |
✔ |
✔ |
✔ |
||
|
4 |
✔ |
✔ |
|||
|
5 |
✔ |
||||
|
6 |
✔ |
||||
|
7 |
✔ |
✔ |
|||
|
8 |
Points:
16.24 / 20
Feedback
Check My Work
To correct a prior period that has been closed, adjust the book values of the assets and liabilities so that their balances reflect the correct amounts. An offsetting adjustment is made to Retained Earnings for the cumulative effect of the adjustments for prior periods. In this problem you are instructed to record two entries rather than a compound entry so your journal should contain four entries for this problem.
Balance Sheet
Shaded cells have feedback.
Prepare Scobie Company’s Statement of Retained Earnings for the year ended December 31, 2016. Additional Instructions
Score: 4/31
|
SCOBIE COMPANY |
|
Statement of Retained Earnings |
|
For Year Ended December 31, 2016 |
|
1 |
Retained Earnings, as Previously Reported, January 1, 2016 |
✔ |
|
2 |
Prior Period Adjustments: |
|
|
3 |
Correction of Overstatement in 2015 Depreciation |
|
|
4 |
Correction of Understatement in 2015 Interest |
|
|
5 |
Adjusted Retained Earnings, January 1, 2016 |
|
|
6 |
Add: Net income |
|
|
7 |
||
|
8 |
Less: Cash Dividends |
|
|
9 |
Retained Earnings, December 31, 2016 |
In: Accounting
Exercises
1. A 25 kVA single-phase transformer has the primary and secondary number of turns of 200 and 400, respectively. The transformer is connected to a 220 V, 50 Hz source. Calculate the (i) turns ratio, and (ii) mutual flux in the core.
2. A 25 kVA, 2200/220 V, 50 Hz single-phase transformer’s low voltage side is short-circuited and the test data recorded from the high voltage side are P=150 W, I1 = 5A and V1 = 40 V. Determine the (i) equivalent resistance, reactance and impedance referred to primary, (ii) equivalent resistance, reactance and impedance referred to secondary.
3. A 30 kVA transformer has the iron loss and full load copper loss of 350 and 650 W, respectively. Determine the (i) full load efficiency, (ii) output kVA corresponding to maximum efficiency, and (iii) maximum efficiency. Consider that the power factor of the load is 0.6 lagging. (97.74%, 13.2 kW, 94.96%).
4. A 2.5 kVA, 200 V/40 V single-phase transformer has the primary resistance and reactance of 3 and 12 Ω, respectively. On the secondary side, these values are 0.3 and 0.1 Ω, respectively. Find the equivalent impedance referred to the primary and the secondary. (17.9ohms, 0.72ohms).
In: Electrical Engineering
Synthetically produced ethanol is an important industrial commodity used for various purposes, including as a solvent (especially for substances intended for human contact or consumption); in coatings, inks, and personal care products; for sterilization; and as a fuel. Industrial ethanol is a petrochemical synthesized by the hydrolysis of ethylene:
C2H4 (g) + H2O (v) <=>C2H5OH (v)
Some of the product is converted to diethyl ether in the undesired
side reaction:
2 C2H5OH (v)<=> (C2H5 )2O (v) + H2O (v)
The combined feed to the reactor contains 53.7 mole% C2H4, 36.7% H2O, and the balance nitrogen, and enters the reactor at 310oC. The reactor operates isothermally at 310oC. An ethylene conversion of 5% is achieved, and the yield of ethanol (moles ethanol produced/moles ethylene consumed) is 0.900. Hint: treat the reactor as an open system.
Data for Diethyl Ether:
ˆ
H of = -271.2 kJ/mol for the liquid
ˆ
Hv = 26.05 kJ/mol (assume independent of T )
Cp[kJ/(molC)] = 0.08945 + 40.33*10-5T(C) -2.244*10-7T2
(a) Calculate the reactor heating or cooling requirement in
kJ/mol feed.
(b) Why would the reactor be designed to yield such a low
conversion of ethylene? What processing
step (or steps) would probably follow the reactor in a commercial implementation of this process?
In: Chemistry
Transcribing Anonymous SEC Tips
Java or Python
* The function is expected to return a STRING_ARRAY.
* The function accepts following parameters:
* 1. STRING_ARRAY inputNames
* 2. STRING_ARRAY secRecords
*/
Problem Statement
Introduction
Imagine you are helping the Security Exchange Commission (SEC) respond to anonymous tips. One of the biggest problems the team faces is handling the transcription of the companies reported by the callers. You've noticed that sometimes the company name is misheard by the person taking the call, sometimes it is simply mistyped, and sometimes both. These problems make it more difficult to search the SEC records to identify the company.
You have access to the list of transcribed company names and the database of SEC records. We need a way to effectively translate company names based on their transcriptions so we can narrow our search results to the one company we are interested in.
Input
You will receive a string array representing the list of transcribed company names.
Each string in the array takes the following form:
You will also receive a string array representing the database of SEC records.
You may also make the following assumptions about the structure:
Output
For each transcribed company name in the input string array, you want to match that to a company name (first part of a string) in the SEC database. The second part of the string in the SEC database will represent the company's EIN. Your output should also be a string array, this time representing the EINs mapped to the names in the input string array. You may assume that every input name will match a name in the SEC records.
Responding to Calls
The Basics
Let's start with the first step: making sure that if the name is transcribed perfectly, we match that company's record in the database right away. This will give you an idea of how to match company names in our system and what the output array should be. This will also show you how the input is structured if you desire to make your own custom inputs. The input comes in the form of two string arrays, where the first line represents the length of the array. An example is below.
Input
3
Pear Computers
Construct An Ursus
Planetary Technologies
3
Pear Computers;54-1264938
Construct An Ursus;58-1481332
Planetary Technologies;19-3563561
Output
["54-1264938", "58-1481332", "19-3563561"]
Your code should pass test cases 0, 1, and 2 after solving this step.
Misspellings
The second thing we want to look for are basic misspellings due to the transcriber hearing the company name correctly but missing a keystroke or pressing the wrong key instead. Think "Harveys Steakhouse" turns into "Harfeys Sreakhouse" or "Sugar and Sugar" turns into "Sugra and Sugar". In the first example, the transcriber missed the "v" key and hit "f" instead, and missed "t" and hit "r" instead. In the second, the transcriber accidentally typed "r" before "a". You should pass test cases 3 through 8 after solving this problem. Hint: looking up the phrase "string edit distance" in a search engine should be of some help to you here.
Input
3
Pewar Computers
Consuct A Ursuus
Planteray Techniligies
3
Pear Computers;54-1264938
Construct An Ursus;58-1481332
Planetary Technologies;19-3563561
Output
["54-1264938", "58-1481332", "19-3563561"]
Metaphones
The last and trickiest instance of transcription comes in the form of arbitrary misspellings resulting from the transcriber either hearing the name correctly and using a different spelling than the one in our database, or mishearing the name in some form. Think "Ashley Antiques" vs. "Ashlee Antiques" vs. "Ashleigh Antiques" or "Rate My Reading" turns into "Great My Treating". This is a purposefully very open-ended and tricky problem, and you are not expected to get all cases. One example is viewable and most are purposefully hidden - try to be creative with your solution, as there are multiple ways you could solve this piece! Test cases 9 through 16 are the ones that relate to this part of the problem; as before, an example is below.
Input
3
Pare Computers
Conduct An Ersis
Palintary Technawlogies
3
Pear Computers;54-1264938
Construct An Ursus;58-1481332
Planetary Technologies;19-3563561
Output
["54-1264938", "58-1481332", "19-3563561"]
In: Computer Science
An outbreak of this disease in New York City in 1999 was originally diagnosed as St. Louis Encephalitis, but it was later determined that it was actually ________.
In New York City, health officials discovered that the mosquitos were the _________, or delivery agent that helped spread the West Nile Virus
In epidemiology, there are three important questions that all epidemiologists will ask. What are they?
What was the notifiable disease mentioned in the class lecture?
The AIDS epidemic in the United States can be traced back to 1981 when what rare cancer was seen in homosexuals?
All of the following are examples of epidemiological studies except:
This condition was discovered in July 1976 at an American Legion 4-day convention held in Philadelphia.
In: Nursing
Explain the possible correclation where both perpetrators and victims of violent crimes are likely to have consumed alcohol prior to certain aggressive acts, such as rape, assault, domestic violence, and murder (Collins and Messerschmidt 1993; Arseneault et al.2000; Cunradi et al. 1999; Scott et al. 1999).
ARSENEAULT, L.; MOFFITT, T.E.; CASPI, A.; TAYLOR, P.J.; AND SILVA, P.A. Mental disorders and violence in a total birth cohort: Results from the Dunedin Study. Archives of General Psychiatry 57:979–986, 2000.
COLLINS, J.J., AND MESSERSCHMIDT, M.A. Epidemiology of alcohol-related violence. Alcohol Health & Research World 17:93–100, 1993.
CUNRADI, C.B.; CAETANO, R.; CLARK, C.L.; AND SCHAFER, J. Alcohol-related problems and inti mate partner violence among white, black, and Hispanic couples in the U.S. Alcoholism: Clinical and Experimental Research 23:1492–1501, 1999.
SCOTT, K.D.; SCHAFER, J.; AND GREENFIELD, T.K. The role of alcohol in physical assault perpetration and victimization. Journal of Studies on Alcohol 60:528–536, 1999.
In: Psychology
| BOXPLOT & WHISKERS | |||||||||||||
| Student ID | Score pre training | Score post training | Scenario: | ||||||||||
| 102 | 50 | 75 | You work for the Medical Center's Corporate Education Department. You developed a new | ||||||||||
| 442 | 60 | 75 | leadership program as part of the Center's succession plan. You had your first cohort of | ||||||||||
| 325 | 65 | 85 | managers successfully complete the training program. Each participant completed pre- | ||||||||||
| 154 | 75 | 90 | assessment before starting the classroom instruction and a post-assessment following the | ||||||||||
| 114 | 80 | 95 | completion of the program. You are expected to prepare a BOXPLOT & WHISKER diagram for | ||||||||||
| 178 | 40 | 75 | each group of data (score before training & score post training). | ||||||||||
| 165 | 60 | 80 | |||||||||||
| 520 | 90 | 90 | Please provide your interpretation of the results. For example, you might want to compare | ||||||||||
| 220 | 80 | 85 | the two diagrams and point out the similarties and differences. You may want to share some | ||||||||||
| 335 | 60 | 85 | relevant descriptive statistics about the two groups of data. | ||||||||||
In: Statistics and Probability