Reference no: EM131324324
Assignment
Average Salary of Major League Baseball Players
Create an application that calculates the average and highest salary of Major League Baseball players in 2011 and 2012.
When the user clicks a button, the application reads a csv file (see the attached Salaries.csv) and calculates the average and the highest salary as follows.
Reads each line of the file data using a while loop (start from the second row)
Splits each row by using a delimiter (‘,') into five tokens
Reads year and salary information - they are 1st and 5th tokens and you will need to convert them to integer
Calculates the average and gets the highest.
To calculate the average, you will need to get the sum of the salaries in 2011 and 2012 and then calculate the average after the loop
To get the highest, you will need to declare a variable for the highest salary before the loop and updates the highest salary variable when new salary is greater than the previous highest salary. By doing so, you will be able to get the highest salary at the end of the loop.
After the loop, average and highest salary of each year should be displayed as follows.
What is the current yield for bond-capital gains yield
: Bond P is a premium bond with a coupon rate of 10 percent. Bond D has a coupon rate of 5 percent and is currently selling at a discount. Both bonds make annual payments, have a YTM of 7 percent, and have nine years to maturity. What is the current yi..
|
Explain the differential shipping rates
: Because of the large U.S. trade imbalance with major Asian nations, cargo ships arrive at West Coast seaports fully loaded but return to Asia half to completely empty. Use the concept of opportunity cost to help explain the differential shipping r..
|
Post the journal entries to general ledger accounts
: Using the chart of accounts provided below, and the Excel template provided with this assignment,prepare journal entries, in good form, to record the May transactions. Explanations are optional - Post the journal entries to general ledger accounts.
|
What is the beta of the resulting portfolio
: Stock A has a beta of 0.7, and stock B has a beta of 1.1. You invest 0.2% of your capital in stock A, and the rest in stock B. What is the beta of the resulting portfolio?
|
Create an application that calculates the average salary
: Create an application that calculates the average and highest salary of Major League Baseball players in 2011 and 2012.
|
What is the enterprise value-ebitda multiple
: The market value of the equity of Ginger, Inc., is $740,000. The balance sheet shows $48,000 in cash and $236,500 in debt, while the income statement has EBIT of $105,500 and a total of $171,500 in depreciation and amortization. What is the enterpris..
|
Who was more responsible for the outbreak of the cold war
: Who was more responsible for the outbreak of the cold war between the United States and the Soviet Union: S. Truman, or Joseph Stalin
|
What were the perspectives of the workers during strike
: What were the perspectives of the workers and management (mainly Carnegie but also Frick) during the Homestead strike? Could Carnegie have compromised on the issues between him and the union? Or was there an irreconcilable conflict which had to be..
|
Design the interface classes drawable rotatable and sounds
: Design the interface classes Drawable, Rotatable, Resizable and Sounds. Compare and contrast abstract classes and interfaces. In what situations would you use an abstract class? in what situations would you use an interface?
|