java: Sample output: Aoccdrnig to reacresh at an Elingsh uinervtisy, it deos not mttaer in waht...

java:

Sample output: Aoccdrnig to reacresh at an Elingsh uinervtisy, it deos not mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer are in the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae we do not raed ervey lteter by it slef but the wrod as a wlohe and the biran fguiers it out aynawy.

PROGRAM DESCRIPTION: In this assignment, you will read an unspecified number of lines of text from STDIN. Input is terminated with EOF (ctrl-d for keyboard input). Your only output, to STDOUT, will echo the input except that the letters of any word with more than three characters will be randomly shuffled (except for the first and last letters). Don't scramble any punctuation, and you may assume that punctuation will only occur at the end of a word. Any word will have, at most, one punctuation character. Punctuation does not count towards the length of the word. You may also assume that each word will be separated by one space and that a line will have no leading or trailing whitespace. Blank lines are allowable. You must preserve the newlines (output must have the same number of lines and the same number of words on each line as when input.) (A word, here, is defined as a sequence of alphanumeric characters delimeted by whitespace.) For this assignment you must code the shuffle algorithm as described in class, and not a library shuffle function.

Sample input:According to research at an English university, it does not matter in what order the letters in a word are, the only important thing is that the first and last letter are in the right place. The rest can be a total mess and you can still read it without a problem. This is because we do not read every letter by itself but the word as a whole and the brain figures it out anyway.

Sample run:

This is a test
This is a tset
Hello, how are you today?
Hlleo, how are you toady?

SUGGESTIONS

You may find it easiest to complete this program in stages. Begin by writing a program that echos input lines of text to output. Then add the ability (a function) to break a line of text into individual words, finally add the scrambling feature (another function) for a word.

In: Computer Science

Suppose you heard the following criticism of social psychological research: “A lot of the studies are...

Suppose you heard the following criticism of social psychological research: “A lot of the studies are done with college students in artificial laboratory settings, such as the Latané and Darley experiment in which people heard another student have a seizure while wearing headphones in a cubicle.

1. What is the value in studies like this (given that the participants are not representative samples of ALL human beings)? What do we need to watch out for when we are interpreting the results?  

2. Can we learn anything from studies in which the settings are not representative of everyday life?

3. How would a social psychologist answer this criticism?

In: Psychology

For many years, Thomson Company manufactured a single product called LEC 40. Then three years ago,...

For many years, Thomson Company manufactured a single product called LEC 40. Then three years ago, the company automated a portion of its plant and at the same time introduced a second product called LEC 90 that has become increasingly popular. The LEC 90 is a more complex product, requiring 0.80 hours of direct labor time per unit to manufacture and extensive machining in the automated portion of the plant. The LEC 40 requires only 0.40 hours of direct labor time per unit and only a small amount of machining. Manufacturing overhead costs are currently assigned to products on the basis of direct labor-hours. Despite the growing popularity of the company’s new LEC 90, profits have been declining steadily. Management is beginning to believe that there may be a problem with the company’s costing system. Direct material and direct labor costs per unit are as follows: LEC 40 LEC 90 Direct materials $ 30.00 $ 50.00 Direct labor (0.40 hours and 0.80 hours @ $15.00 per hour) $ 6.00 $ 12.00 Management estimates that the company will incur $912,000 in manufacturing overhead costs during the current year and 60,000 units of the LEC 40 and 20,000 units of the LEC 90 will be produced and sold. 1-a. compute the predetermined overhead rate assuming that the company continues to apply manufacturing overhead cost on the basis of direct labor hours. 1-b. using this rate and other data from the problem, determine the unit product cost of each product. 2. management is considering using activity-based costing to assign manufacturing overhead cost to products. The activity-based costing systemm would have all following four activity cost pools: Activity Cost Pool Activity Measure Estimated Overhead Cost Maintaining parts inventory Number of part types $ 225,000 Processing purchase orders Number of purchase orders 182,000 Quality control Number of tests run 45,000 Machine-related Machine-hours 460,000 $ 912,000 Expected Activity Activity Measure LEC 40 LEC 90 Total Number of part types 600 900 1,500 Number of purchase orders 2,000 800 2,800 Number of tests run 500 1,750 2,250 Machine-hours 1,600 8,400 10,000 Determine the activity rate for each of the four activity cost pools. 3. using the activity rates you computed in part 2 a. determine the per unit amount of manufacturing overhead cost that would be assigned to each product using the activity based costing system,. b. compute the unit product cost of each product

In: Accounting

Thalassines Kataskeves, S.A., of Greece makes marine equipment. The company has been experiencing losses on its...

Thalassines Kataskeves, S.A., of Greece makes marine equipment. The company has been experiencing losses on its bilge pump product line for several years. The most recent quarterly contribution format income statement for the bilge pump product line follows:

Thalassines Kataskeves, S.A.
Income Statement—Bilge Pump
For the Quarter Ended March 31
Sales $ 460,000
Variable expenses:
Variable manufacturing expenses $ 133,000
Sales commissions 45,000
Shipping 13,000
Total variable expenses 191,000
Contribution margin 269,000
Fixed expenses:
Advertising (for the bilge pump product line) 21,000
Depreciation of equipment (no resale value) 117,000
General factory overhead 44,000 *
Salary of product-line manager 117,000
Insurance on inventories 7,000
Purchasing department 41,000
Total fixed expenses 347,000
Net operating loss $ (78,000 )

*Common costs allocated on the basis of machine-hours.

†Common costs allocated on the basis of sales dollars.

Discontinuing the bilge pump product line would not affect sales of other product lines and would have no effect on the company’s total general factory overhead or total Purchasing Department expenses.

Required:

What is the financial advantage (disadvantage) of discontinuing the bilge pump product line?

In: Accounting

A block is placed on a frictionless ramp at a height of 12.5 m above the...

A block is placed on a frictionless ramp at a height of 12.5 m above the ground. Starting from rest, the block slides down the ramp. At the bottom of the ramp, the block slides onto a frictionless horizontal track without slowing down. At the end of the horizontal track, the block slides smoothly onto a second frictionless ramp. How far along the second ramp does the block travel before coming to a momentary stop, as measured along the incline of the ramp? After the block comes to a complete stop on the second ramp, it will then begin moving back down the second ramp. What is the speed of the block when it is 8.75 m, vertically, above the ground?

In: Physics

Fiscal Policy is another way to affect the economy. Functional finace proposes that governments should make...

Fiscal Policy is another way to affect the economy. Functional finace proposes that governments should make spending and taxing decisions based on their effect on the economy.   

Give an example of a fiscal policy and the intended goal of the policy.

Do you agree that the government should make taxing and soending decisions based on what the economy needs in terms of expansion or contraction? Explain.

In: Economics

A film of soapy water (n = 1.33) on top of a sheet of crystalline quartz...

A film of soapy water (n = 1.33) on top of a sheet of crystalline quartz has a thickness of 168 nm. What wavelength is most strongly reflected if it is illuminated perpendicular to its surface? (This is the apparent color of the soapy film.)

In: Physics

Write a recursive method to find the smallest int in an unsorted array of numbers. int[]...

Write a recursive method to find the smallest int in an unsorted array of numbers.

int[] findMin = { 0, 1, 1, 2, 3, 5, 8, -42, 13, 21, 34, 55, 89 };

System.out.printf("Array Min: %d\n", arrayMin(findMin, 0)

public static int arrayMin(int[] data, int position) { ??? }

everything I've tried doesn't return the -42 like it should, somehow I think I end up returning a count of the search or something like that and I'm not sure where I'm going wrong. Thanks for the help.

In: Computer Science

Min. 175 words Discuss the structure of a Java™ program including files and arrays with GUI....

Min. 175 words

Discuss the structure of a Java™ program including files and arrays with GUI.

How do iterative structures differ from conditional structures in OOP?

Provide an example.

In: Computer Science

The following data were taken from the balance sheet of Nilo Company at the end of...

The following data were taken from the balance sheet of Nilo Company at the end of two recent fiscal years:

Current Year Previous Year
Current assets:
  Cash $516,800 $420,000
  Marketable securities 598,400 472,500
  Accounts and notes receivable (net) 244,800 157,500
  Inventories 950,400 597,800
  Prepaid expenses 489,600 382,200
  Total current assets $2,800,000 $2,030,000
Current liabilities:
  Accounts and notes payable
  (short-term) $464,000 $490,000
  Accrued liabilities 336,000 210,000
  Total current liabilities $800,000 $700,000

a. Determine for each year (1) the working capital, (2) the current ratio, and (3) the quick ratio. Round ratios to one decimal place.

Current Year Previous Year
1. Working capital $ $
2. Current ratio
3. Quick ratio

b. The liquidity of Nilo has   from the preceding year to the current year. The working capital, current ratio, and quick ratio have all  . Most of these changes are the result of an   in current assets relative to current liabilities.

In: Accounting

(1) name a branded example, then (2) hypothesize about how you might categorize customers by their...

(1) name a branded example, then (2) hypothesize about how you might categorize customers by their different needs, and (3) how the company offers values/benefits to meet those needs for each categorized customers.

  • Automobiles (B2C) (20 points)
  • Air travel transportation (B2C) (20 points)
  • Computer software (B2C) (20 points)

In: Economics

1-Give a BNF grammar (do not use EBNF) for the language that generates the set of...

1-Give a BNF grammar (do not use EBNF) for the language that generates the set of all strings consisting of the keyword begin, followed by zero or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it.

2-Give a BNF grammar (do not use EBNF) for the language that generates the set of all strings consisting of the keyword begin, followed by one or more statements with a semicolon after each one, followed by the keyword end. Use the non-terminal for statements, and do not give productions for it.

3-Give a BNF grammar (do not use EBNF) for the set of all strings consisting of zero or more as, with a comma between each a and the next. (There should be no comma before the first or after the last.)

4-Give a BNF grammar (do not use EBNF) for the set of all strings consisting of an open bracket (the symbol [) followed by a list of zero or more digits separated by commas, followed by a closing bracket (the symbol ]).

In: Computer Science

Execusmart Consultants has provided business consulting services for several years. The company has been using the...

Execusmart Consultants has provided business consulting services for several years. The company has been using the percentage of credit sales method to estimate bad debts but switched at the end of the first quarter this year to the aging of accounts receivable method. The company entered into the following partial list of transactions.

  1. During January, the company provided services for $350,000 on credit.
  2. On January 31, the company estimated bad debts using 1 percent of credit sales.
  3. On February 4, the company collected $175,000 of accounts receivable.
  4. On February 15, the company wrote off a $450 account receivable.
  5. During February, the company provided services for $300,000 on credit.
  6. On February 28, the company estimated bad debts using 1 percent of credit sales.
  7. On March 1, the company loaned $16,000 to an employee, who signed a 9% note due in 3 months.
  8. On March 15, the company collected $450 on the account written off one month earlier.
  9. On March 31, the company accrued interest earned on the note.
  10. On March 31, the company adjusted for uncollectible accounts, based on the following aging analysis, which includes the preceding transactions (as well as others not listed). Prior to the adjustment, Allowance for Doubtful Accounts had an unadjusted credit balance of $9,000.
Number of Days Unpaid
Customer Total 0–30 31–60 61–90 Over 90
Arrow Ergonomics $ 1,600 $ 800 $ 700 $ 100
Asymmetry Architecture 3,500 $ 3,500
Others (not shown to save space) 106,700 40,700 54,000 6,500 5,500
Weight Whittlers 3,500 3,500
Total Accounts Receivable $ 115,300 $ 45,000 $ 54,700 $ 6,600 $ 9,000
Estimated Uncollectible (%) 2 % 20 % 30 % 40 %

Required:

  1. For items (a)–(j), analyze the amount and direction (+ or –) of effects on specific financial statement accounts and the overall accounting equation. TIP: In item (j), you must first calculate the desired ending balance before adjusting the Allowance for Doubtful Accounts. (Do not round intermediate calculations. Enter any decreases to Assets, Liabilities, or Stockholders Equity with a minus sign.)

Assets = Liabilities + Stockholders’ Equity
a.
b.
c.
d.
e.
f.
g.
h.
i.
j.

In: Accounting

Why does titrimetric end-group analysis become impractical for determining the M_n of polymers whose average molecular...

Why does titrimetric end-group analysis become impractical for determining the M_n of polymers whose average molecular weight exceeds about 25000?

In: Chemistry

A power network involves three substations A, B, and C. Overloads at any of these substations...

A power network involves three substations A, B, and C. Overloads at any of these substations might result in a blackout of the entire network. Past history has shown that if substation A alone experiences an overload, then there is a 1% chance of a network blackout. For stations B and C alone these percentages are 2% and 3%, respectively. Overloads at two or more substations simultaneously result in a blackout 5% of the time. During a heat wave there is a 64% chance that substation A will experience an overload, a 24% chance that substation B will experience an overload, and a 19% chance that substation C will experience an overload. There is a 3% chance that exactly two of the substations will simultaneously experience overload, and it is equally likely to be any two of the three. Finally, there is a 2% chance that all three substations experience an overload.

a) What is the probability that a blackout due to an overload occurs during a heat wave?

b) If a blackout occurred during a particular heat wave, what is the probability that the substation A alone experienced an overload?

c) If a blackout occurred during a particular heat wave, what is the probability that an overload occurred at two or more substations simultaneously?

Thank you!

In: Math