Create an application that calculates the average salary

Assignment Help Programming Languages
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.

Reference no: EM131324324

Questions Cloud

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?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd