// Program Name:
WeeklySales.java
// Course:
CSE 1302J
// Student Name:
Bradley Shedd
// Assignment Number:
Lab#5
// Due Date:
10/11/2010
// Purpose:
Sorts the sales staff in descending
//
order by sales.
// *************************************************************
// WeeklySales.java
// ************************************************************
import java.util.Scanner;
import java.io.*;
public
class
WeeklySales
{
public
static
void
main(String[] args)throws
IOException
{
Salesperson[] salesStaff =
new
Salesperson[10];
Scanner scan =
new
Scanner(new File("input5.txt"));
for
(int i = 0; i < salesStaff.length;
i++)
{
salesStaff[i] =
new
Salesperson(scan.next(), scan.next(), scan.nextInt());
}
Sorting.insertionSort(salesStaff);
System.out.println ("\nRanking
of Sales for the Week\n");
for
(Salesperson s : salesStaff)
System.out.println (s);
System.out.println("\nExtra
Credit Lab5 by Bradley Shedd");
}
}