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
No one has answered this question yet.
Answer this Question
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 - "POWERS" Compute the power of a number given the ...
Java - create a java program that accepts students names, and test scores from a...
JAVA - simple java program to retrive data from oracle database between specific...
Java - I am trying to write an algorithm for my JAVA class and am having some ...
java - can anyone help me with this? I'm new to java! Write a program that ...
computer - this isnt really a school question but i have a question about the ...
Video in java(netbeans) - Hi, i am using netbeans and i'm trying to ...
programming - Having troube with java, i am not a regular programmer, if anybody...
For Further Reading