Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*; //*calls the Java swing library for input/output
- class bonus //Start Class bonus
- {
- public static void main (String[] param)
- {
- int prof = profit();
- int client = nclient();
- int work = work();
- performance();
- System.exit(0);
- }
- public static int profit() // begins the method "profit" to get the profit score for the candidate
- {
- int prof =0; int profout;
- String profinput = JOptionPane.showInputDialog("Enter the score for profit making");
- prof = Integer.parseInt(profinput);
- profout = (prof * 2);
- return (profout);
- }
- public static int nclient() // begins the method "nclient" to get the new client score for the candidate
- {
- int nwclnt =0; int clntout;
- String clntinput = JOptionPane.showInputDialog("Enter the score for new client aquisition");
- nwclnt = Integer.parseInt(clntinput);
- clntout = (nwclnt * 3);
- return (clntout);
- }
- public static int work() // begins the method "work" to get the work ethic score for the candidate
- {
- int work =0; int worktout;
- String wrkinput = JOptionPane.showInputDialog("Enter the score for work done");
- work = Integer.parseInt(wrkinput);
- worktout = (work * 5);
- return (worktout);
- }
- public static int performance () //calls profout the values from the previous methods
- {
- int perf =0;
- int pprof = 0;
- pprof = main(profit);
- System.out.println ("you scored " +perf +" out of 50");
- return(perf);
- }
- } //End Class Bonus
Add Comment
Please, Sign In to add comment