Guest User

Untitled

a guest
Feb 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.84 KB | None | 0 0
  1. import javax.swing.*; //*calls the Java swing library for input/output
  2.  
  3. class bonus //Start Class bonus
  4.    
  5. {
  6.     public static void main (String[] param)
  7.     {
  8.         int prof = profit();
  9.         int client = nclient();
  10.         int work = work();
  11.                 performance(work,client,prof);
  12.         System.exit(0);
  13.     }
  14.        
  15.         public static int profit() // begins the method "profit" to get the profit score for the candidate
  16.         {
  17.             int prof =0; int profout;
  18.                 String profinput = JOptionPane.showInputDialog("Enter the score for profit making");
  19.                 prof = Integer.parseInt(profinput);
  20.                 profout = (prof * 2);
  21.  
  22.             return (profout);
  23.         }
  24.        
  25.         public static int nclient() // begins the method "nclient" to get the new client score for the candidate
  26.         {
  27.             int nwclnt =0; int clntout;
  28.                 String clntinput = JOptionPane.showInputDialog("Enter the score for new client aquisition");
  29.                 nwclnt = Integer.parseInt(clntinput);
  30.                 clntout = (nwclnt * 3);
  31.            
  32.             return (clntout);
  33.         }
  34.        
  35.         public static int work() // begins the method "work" to get the work ethic score for the candidate
  36.         {
  37.             int work =0; int worktout;
  38.                 String wrkinput = JOptionPane.showInputDialog("Enter the score for work done");
  39.                 work = Integer.parseInt(wrkinput);
  40.                 worktout = (work * 5);
  41.            
  42.             return (worktout);
  43.         }
  44.        
  45.         public static int performance (int work,int client,int prof) //calls profout the values from the previous methods
  46.         {
  47.             int perf = work+client+prof;
  48.             System.out.println ("you scored " +perf +" out of 50");
  49.             return(perf);
  50.         }
  51. } //End Class Bonus
Add Comment
Please, Sign In to add comment