Week 5 Reusability Paper
Professor Donald Mc Pherson
Due: July 8th 2013
My team’s mission for this week is to choose two of our team member’s assignments and put them together and see how the program works. For this assignment we have chosen to use the following team members: Cathy Irwin and Eric McMichael. We have all agreed that both team member’s had a great information and programming. As a team we all discussed how their parts would come together nicely by working together.
What we did was take a portion of Cathy’s and insert this into Eric’s program:
//Start of Cathy Irwin's part of the program double Salary; double Sales; double Commission; double Bonus; double AnnualCompensation; Salary = 50000;
String SalesPerson = new String; // Creates an array using a string. int AnnualSales = new int; // Creates an array using an integer.
Scanner input = new Scanner(System.in); // Activates the user input
System.out.println("Hello, let's compair two salespersons annual sales."); System.out.println("Please enter the 1st salesperson's name: "); SalesPerson = input.nextLine(); System.out.println("Please enter the 2nd " + "salesperson's name:"); SalesPerson = input.nextLine();
System.out.println("Please enter " + SalesPerson + "'s Annual Sales:"); AnnualSales = input.nextInt();
System.out.println("Please enter " + SalesPerson + "'s Annual Sales:"); AnnualSales = input.nextInt(); //Set the decimal format DecimalFormat USDFormat = new DecimalFormat("$#,##0.00"); double