In C Sharp with the use of the Try and Catch method create an application that...

In C Sharp with the use of the Try and Catch method create an application that displays the contents of the Teams.txt file in a ListBox control. When the user selects a team in the ListBox, the application should display the number of times the team has won the World Series in the time period from 1903 through 2012.

Teams.txt--This file contains a list of several Major League baseball teams in alphabetical order. Each team listed in the file has won the World Series at least once.

WorldSeriesWinners.txt - This file contains a chronological list of the World Series' winning teams from 1903 through 2012. (The first line in the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2012. Note that the World Series was not played in 1904 or 1994.)

Hint: Read the contents of the WorldSeriesWinners.text file into a List. When the user selects a team in the ListBox, the application should display the number of times the selected team appears.

In: Computer Science

Companies file for bankruptcy protection more often than not due to cash problems. We know from...

Companies file for bankruptcy protection more often than not due to cash problems. We know from studying accrual accounting that profits and cash flow most often have different timing. Comment on how the income statement and the cash flow statement are connected. Do you feel both statements provide sufficient information for internal managers and external investors to make good decisions? Provide support for your response.

Your grade is calculated based on your personal response to the discussion topics AND responses to at least two classmates. Your discussion post and responses to classmates must be substantive. As a guideline, your discussion should be 3 - 4 paragraphs comprised of 5 -7 sentences per paragraph. Your responses to classmates should each be 2 -3 paragraphs with 5-7 sentences per paragraph.

In: Accounting

Java program code: InventoryManager For this assignment, you will be creating an inventory manager for a...

Java program code: InventoryManager

For this assignment, you will be creating an inventory manager for a store that sells vegetables. The inventory will be managed using arrays.

The required name for the project is InventoryManager.
The required name for the Java file is InventoryManager.java.
The required main class name is InventoryManager.

Part 1: Planning the store

Decide the name of your store. Place this name in a constant called STORE_NAME.
As soon as the program starts, display a greeting to the user to let them that they have begun using the inventory management app for this store.
Then, perform the following:

  1. Create an array called items for a maximum of 5 items in your store. The items in the array should be onion, broccoli, carrot, zucchini, and cucumber.
  2. Create a second array called quantities to store the quantity of each of the five items.
    Using a loop, have the user enter the quantity of each of the five items, and make sure each value of quantity is inserted into quantities array at the appropriate index (the same index as the item in the items array).
    For this step, we will assume the user will only enter an integer, but you should validate their input to make sure they enter a value greater than or equal to zero. If they do not enter an integer greater than or equal to zero, then you must prompt them to enter the value again (until they get it right).
    HINT: Consider using another loop to have them enter the quantities.
  3. Create a third array called prices to store the price of each of the five items. Using a similar process to Step 2, have the user enter the price of each of the five items and make sure they are stored in the prices array at the appropriate index. Just like Step 2, you should make sure the user-entered prices are greater than or equal to 0. Otherwise, they should repeat entering the value until they get it correct.

The following table is just one example of the values that might populate the three arrays. Each index represents one single item.

INDEX 0 1 2 3 4
items array onion broccoli carrot zucchini cucumber
quantities array 12 4 3 56 30
prices array 1.52 0.53 1.25 1.34 2.32


NOTE: Apart from the items array, these are just example values. Because the user is required to enter these values, values in quantities and prices could be anything.

If we were to determine the quantity of our carrots, we would first find that "carrot" is located at index 2 in items, so we would retrieve the value in quantities at index 2, which is a quantity of 3. To find the price, we would retrieve the value at index 2 of prices, which is 1.25.

Make sure you use the appropriate datatype for each array (int? double? String?)

All of the previous directions take place only at the beginning of the program. You can think of it as the set up for the main part of the program. Once done, the user will be taken into Part 2 of this assignment.

Part 2: Operating the InventoryManager

Display to the user the possible operations on the inventory and prompt him/her to choose one. The user should select the option by entering its number. Every time the user completes one of the operations (except for Exit), the user should be taken back to this screen where they can choose from this list again. If Exit is selected, the user should be given a message thanking them for using the program, and then the program should be properly closed. Do not use System.exit() to close the program. You must exit the program by exiting the loop itself.

There are 5 possible operations:

1. Print inventory
2. Check for low inventory
3. Highest and lowest inventory value items
4. Total inventory value
5. Exit

1. Print inventory

This operation prints all the inventory items, with each item shown in the following format:

Item: ITEM-NAME
Quantity: ITEM-QUANTITY
Price: ITEM-PRICE
Total value: TOTAL-VALUE

ITEM-NAME should be replaced by the name of the item.
ITEM-PRICE should be replaced by the price of the item.
TOTAL-VALUE should be replaced by the total price if someone were to purchase the entire stock of items.

Make sure your output appears exactly like the format above. You should print the information for all five items in an efficient way (using a loop).

Once this is done, the user should be allowed to select one of the five options from the original menu.

2. Check for low inventory

This operation checks for items that have a quantity of less than 5, then prints them in the same format as in option 1.

If there is no such item whose quantity is less than 5, then display a message that explains that to the user.

Once this is done, the user should be allowed to select one of the five options from the original menu.

3. Highest and lowest inventory value items

This operation finds the following two items:

  • The item with the highest inventory value.
  • The item with the lowest inventory value.

Remember that the total inventory value is the value of the whole stock of the inventory item combined, which would be equal to the quantity multiplied by the price.

If two or more items have a matching inventory value and they are either the highest or lowest, then you only need to display one of them.

Display the highest and lowest inventory value items in the same way as option 1.

Once this is done, the user should be allowed to select one of the five options from the original menu.

4. Total inventory value

This is the total value of ALL items in the store, taking into account the quantity of each item. Display this value to the user.

Once this is done, the user should be allowed to select one of the five options from the original menu.

5. Exit

If selected, the user should be given a message thanking them for using the program, and then the program should exit. Do not use System.exit() to exit the program. You must exit the program by logically ending the loop.

Requirements

When this program runs, it should be obvious to the user the values they are seeing. Include all units when displaying values. For example, when displaying dollar values, make sure you include a dollar sign ($). You do not need to worry about making two decimal digits show when displaying dollar values. For example, it's okay to display $4.5 instead of $4.50.

In: Computer Science

Titration with an indicator is a common technique that chemists use when counting moles. a )...

Titration with an indicator is a common technique that chemists use when counting moles.

a ) Would this technique be useful for determining the pH of a water sample from a lake or stream?

b) Can this technique determine if a lake or stream is affected by acid rain?

In: Chemistry

Draw extraction schemes that would separate:- (a) naproxen and cortisone. (b) ibuprofen from caffeine; (c) acetaminophen...

Draw extraction schemes that would separate:-

(a) naproxen and cortisone.

(b) ibuprofen from caffeine;

(c) acetaminophen and ibuprofen;

In: Chemistry

I need to answer all 16 questions. Please do as many as you can. Please answer...

I need to answer all 16 questions. Please do as many as you can.

Please answer the following question of database management.
1. Describe the process of creating a table in SQL and the different data types you can use for fields.

2. What is the purpose of the WHERE clause in SQL? Which comparison operators can you use in a WHERE clause?
3. How do you write a compound condition in an SQL query? When is a compound condition true?

4. What is a computed field? How can you use one in an SQL query? How do you assign a name to a computed field?

6. How do you use the IN operator in an SQL query?

7. How do you sort data in SQL? When there is more than one sort key, how do you indicate which one is the major sort key? How do you sort data in descending order?


8. What are the SQL built-in functions? How do you use them in an SQL query?

9. What is a subquery? When is a subquery executed?


10. How do you group data in SQL? When you group data in SQL, are there any restrictions on the items that you can include in the SELECT clause? Explain.


11. How do you join tables in SQL?

12. In a complex join, how is the number of tables you wish to join related to the number of WHERE conditions?

13. How do you qualify the name of a field in an SQL query? When is it necessary to do so?

14. How do you take the union of two tables in SQL? What criteria must the tables meet to make a union possible?

15. Describe the three update commands in SQL.

16. How do you save the results of an SQL query as a table?

In: Computer Science

4. As the chapter states, “Defining and targeting your audience is the best way to ensure...

4. As the chapter states, “Defining and targeting your audience is the best way to ensure a match between the company’s product or service and the consumer’s needs.” It only makes good sense that a market-oriented company would want to know as much as possible about its target audiences in order to serve them better. Today, technology has the capability to provide an increasing volume of data that allows audience profiling to become more targeted. Technology-driven audience profiling includes demographics, psychographics, multimedia preference, and characteristics studies in its analysis arsenal. From an ad agency or marketing organization perspective, the idea is simple: the more information you can supply to the creatives the better. OK, so what’s wrong with the picture we just presented to you? There are most likely many faults; however, chief among them are concerns about data collection methods and information security. In other words, there is worry about privacy rights. To investigate this ethical issue, conduct research on the privacy rights of consumers. Specifically, examine privacy rights on the Web and company statements about how consumer information is used. Summarize your findings. Once this is done, summarize your thoughts on how researchers seeking audience profiles can honor consumers’ privacy rights and still conduct meaningful research.

In: Economics

21. The diagram shows a 0.12-kg square block at four positions along a track. The track...

21.

The diagram shows a 0.12-kg square block at four positions along a track. The track is frictionless between points A and B. Elsewhere, the coefficient of static friction on the block is 0.26.

Initially, the block is held in place against a spring by a horizontal external force of magnitude 35 N. Then the external force is removed, and the block is projected forward with speed V1=1.2m/s . The block descends a ramp and has speed V2=1.4m/s at the bottom. At point C, its speed is V3=1.4m/s. The block stops at point D.

What is the initial compression of the spring?

0.99 cm

0.49 cm

0.26 cm

0.67 cm

0.18 cm

22.

A 1200-kg car is traveling at 15km/h. A 2400kgtruck has 41 times the kinetic energy of the car. How fast is the truck moving?

68 km/h

82 km/h

54 km/h

96 km/h

23.

As a marble rolls across the floor, it gradually slows to a stop due to friction. Which statement best describes the change in mechanical energy of this system?

Mechanical energy was transferred from the floor to the marble.

Mechanical energy was transferred from the marble to the floor.

The mechanical energy of the marble was transformed into nonmechanical energy.

The total energy of the marble and floor, including the mechanical energy, was reduced to zero.

24.

A force is applied to an object in a direction that is perpendicular to the object's displacement. The work performed by the force on the object is ______.

negative

positive

zero

25.

A slithering snake travels once around a circle of radius 3.20m . The coefficient of friction between the ground and the snake is 0.25, and the snake's weight is 80.0NHow much work does the snake do against friction?

800 J

400 J

3900 J

0 J

26.

A car of mass 1091 kg climbs a 5.0° slope at a constant speed of 80.0km/h Assuming that air resistance and friction with the road may be neglected, at what rate must the engine deliver mechanical energy to the car?

21 kW

31 kW

39 kW

238 kW

27.

A ball is released out a window that is 43 m above the ground. At what speed will it hit the ground? Assume air resistance is negligible.

0.86 km/s

0 m/s

58 m/s

29 m/s

28.

A glider with mass m = 0.200 kg sits on a frictionless, horizontal air track. It is connected to a spring of negligible mass and force constant k = 5.00 N/m. You pull on the glider to stretch the spring 0.100 m, and then release the glider. The glider begins to move back toward the equilibrium position (x = 0). What is its speed when x = 0.0800 m?

0.025 m/s

0.300 m/s

0.400 m/s

0.016 m/s

29.

A ramp has the shape of one-fourth of a circle of radius R = 3.00 m. A skateboarder begins at rest at the top of the ramp, then rides to the bottom. What is the skateboarder's speed at the bottom of the ramp? Assume that the effect of friction and other nonconservative forces is negligible.

2.45 m/s

7.67 m/s

9.39 m/s

8.33 m/s

30.

A total of 87 J of work is needed to stretch a spring from x =1.4m to x =2.9m , in which x is displacement from equilibrium. What is the value of the spring constant?

27 N/m

39 N/m

52 N/m

77 N/m

In: Physics

A multi-national-corporation has receivables in a foreign currency. Circle on the correct answer for each question....

A multi-national-corporation has receivables in a foreign currency. Circle on the correct answer for each question.

(1) [ Long or Short ] in the foreign currency forward contract.
(2) [ Long or Short ] in the foreign currency futures contract.
(3) [ Borrow or Lend ] denominate in the foreign currency.

(4) [ Long or Short ] in the foreign currency [ Call or Put] option.

In: Finance

Exercise 21-21 Overhead controllable and volume variances; overhead variance report LO P3 James Corp. applies overhead...

Exercise 21-21 Overhead controllable and volume variances; overhead variance report LO P3 James Corp. applies overhead on the basis of direct labor hours. For the month of May, the company planned production of 8,000 units (80% of its production capacity of 10,000 units) and prepared the following overhead budget: Operating Levels Overhead Budget 80% Production in units 8,000 Standard direct labor hours 30,000 Budgeted overhead Variable overhead costs Indirect materials $ 21,000 Indirect labor 30,000 Power 7,200 Maintenance 4,800 Total variable costs 63,000 Fixed overhead costs Rent of factory building 17,000 Depreciation—Machinery 11,400 Supervisory salaries 25,600 Total fixed costs 54,000 Total overhead costs $ 117,000 During May, the company operated at 90% capacity (9,000 units) and incurred the following actual overhead costs: Overhead Costs Indirect materials $ 21,000 Indirect labor 33,550 Power 8,100 Maintenance 6,210 Rent of factory building 17,000 Depreciation—Machinery 11,400 Supervisory salaries 28,500 Total actual overhead costs $ 125,760 1. Compute the overhead controllable variance. 2. Compute the overhead volume variance. 3. Prepare an overhead variance report at the actual activity level of 9,000 units.

In: Accounting

"Write a function named "firstLast2" that takes as input a vector of integers. The function should...

"Write a function named "firstLast2" that takes as input a vector of integers. The function should return true if the vector starts and ends with the digit 2. Otherwise, it should return false. Test your function with vectors of different length and with the digit 2 at the beginning of the vector, end of the vector, middle of the vector, and missing from the vector."

Additional Requirements:

>Must use a loop allowing the user to continue until he/she quits.

>Read the full name, middle (if there is any) and last name separately.

>Must work even if there is no middle name.

In: Computer Science

On January 2, 2015, the S. H. Park Company (Park) installed a new $84,000 special molding...

On January 2, 2015, the S. H. Park Company (Park) installed a new $84,000 special molding machine for producing a new product. The product and the machine have an expected life of three years. The machines expected disposal value (amount machine can be sold for) at the end of three years is zero. S. H. Park Company paid cash when the equipment was delivered. Park paid for this machinery via bank transfer. On January 3, 2015, Kimiyo Lee, a salesperson for BT Machine and Tool (BT), tells Park: “I wish I had known earlier of your purchase plans. I can supply you with a technically superior machine for $99,000. Lee indicated the machine just purchased can be sold for $16,000. Lee guaranteed that there machine will save S. H. Park $35,000 per year in cash operating costs. This machine will have no disposal value at the end of three years.” Assume all costs are cost of sales. Park examines some technical data. Park is confident of Lee’s claims. However, Park contends, “I’m locked in now. My alternatives are clear: (a) disposal will result in a loss, (b) keeping and using the ‘old’ equipment avoids such a loss. I have brains enough to avoid a loss when my other alternative is recognizing a loss. We’ve got to use that equipment until we get our money out of it.” The annual operating costs of the old machine are $60,000 all paid in cash. This does not include depreciation. The new machine operating costs will be $25,000 which will be paid in cash. Sales, all in cash, are projected to be $850,000 per year. Annual cash expenses related to sales are $350,000 for material, $250,000 for labor and $150,000 for other operating expenses regardless of this decision. Assume that the equipment in question is the company’s only fixed asset. Ignore income taxes and the time value of money. Any cash payments for the machines occurred in 2015 coinciding with the purchase of the equipment. Should Park dispose of the “old-old” machine (stay the course) or should Park acquire new machine’s (New-New) from Lee? Using the template, prepare income statements as they would appear in each of the next three years under both alternatives. Assume straight-line depreciation over a three year period. What is the cumulative increase or decrease in net income for the three years for each alternative? Prepare statements of cash receipts and disbursements as they would appear in each of the next three years under both alternatives. Assume straight-line depreciation over a three year period. What is the total cumulative increase or decrease in cash for the three years for each alternative? If you were the sales person (Kimiyo Lee), how would respond to Mr. Park so as to get him to purchase your product? Using the provided information, if possible, prepare an alternative analysis which provides a similar result. Regardless of the financial analysis, what factors which effect or influence the decision to replace the equipment or stay with old (new) machine

In: Accounting

prove A(A+B) = A using truth table

prove A(A+B) = A using truth table

In: Computer Science

do you think the way classical economics models individual decision making (through utility maximization) is flawed...

do you think the way classical economics models individual decision making (through utility maximization) is flawed and should be altered? If so, how?

In: Economics

In reaching her destination, a backpacker walks with an average velocity of 1.05 m/s, due west....

In reaching her destination, a backpacker walks with an average velocity of 1.05 m/s, due west. This average velocity results, because she hikes for 5.66 km with an average velocity of 2.54 m/s due west, turns around, and hikes with an average velocity of 0.403 m/s due east. How far east did she walk (in kilometers)?

In: Physics