Posted by Jay on Saturday, April 5, 2008 at 4:45pm.
I need to write a Java program using an input file with the below data. I donít even know where to begin. I have written others but this one has me totally confused. I know how to do it using math WL% = Wins / (Wins + Losses)
I also wrote this to use but, canít figure out how to apply it
Private void Calculate WinPercent ()
The program has to do this:
1. Process all data until it reaches the end-of-file. Calculate the win percentage for each team.
2. Output to a file ("top.txt") a listing of all teams with a win percentage greater than .500. This file should contain the team name and the win percentage.
3. Output to a file ("bottom.txt") a listing of all teams with a win percentage of .500 or lower. This file should contain the team name and the win percentage.
4. Count and print to the screen the number of teams with a record greater then .500 and the number of teams with a record of .500 and below, each appropriately labeled.
5. Output in a message box: the team with the highest win percentage and the team with the lowest win percentage, each appropriately labeled. If there is a tie for the highest win percentage or a tie for the lowest win percentage, you must output all of the teams.
Dallas 5 2
Philadelphia 4 3
Washington 3 4
NY_Giants 3 4
Minnesota 6 1
Green_Bay 3 4
Answer This Question
More Related Questions
- java - Write a java application that finds the smallest of several integers. ...
- Java - Can anybody help me figure how to post a Java file to as an attachment. I...
- Java Programming - I'm new to Java and I'm not sure how to write the source code...
- java programming - the learner is asked to write a program using java with user ...
- programming - Write a program which allows user to enter 10 student names and ...
- java programming - write a java program using arrays function for hotel bill ...
- Java - create a java program that accepts students names, and test scores from a...
- Video in java(netbeans) - Hi, i am using netbeans and i'm trying to incorporate ...
- JAVA - simple java program to retrive data from oracle database between specific...
- Java programming - Need help not sure how do this Do an analysis of the ...