import java.awt.*; import java.applet.*; import java.awt.event.*; import java.text.DecimalFormat; import java.awt.color.*; public class TotalCost4 extends Applet { //the following variable declarations are all the hard coded constants from the Excel TCO Calc - (subject to change) int priceOfPC = 700; int largeT1 = 2000; int smallCable = 50; int smallORPrice = 1428; int mediumORPrice = 4428; int largeORPrice = 7188; int smallAnnualCable = 480; int mediumAnnualSDSL = 2388; int largeAnnualT1 = 38400; int watchgaurdFirebox = 4990; int watchgaurdFireboxPlus = 9990; int watchgaurdFireboxFast = 12990; int managementSoftwareLow = 3995; int authenticationCosts = 14800; int watchgaurdSupportSmall = 995; int watchgaurdSupportMedium = 1495; int watchgaurdSupportLarge = 1495; int managementLabor = 70000; int checkpointFirewallSmall = 10500; int checkpointFirewallMedium = 47500; int checkpointFirewallLarge = 92500; int managementSoftwareHigh = 12000; int checkpointSupportSmall = 3675; int checkpointSupportMedium = 16625; int checkpointSupportLarge = 32375; int managedServicesHardwareSmall= 2780; int managedServicesHardwareMedium= 3595; int managedServicesHardwareLarge= 4670; //Image swoop1, swoop2; //the three input fields TextField input1 = new TextField("",8); TextField input2 = new TextField("",8); TextField input3 = new TextField("",8); //section one code TextField setup_resultOR = new TextField("",8); TextField annual_resultOR = new TextField("",8); TextField total_resultOR = new TextField("",8); //section two code TextField setup_resultLowDoIt = new TextField("",8); TextField annual_resultLowDoIt = new TextField("",8); TextField total_resultLowDoIt = new TextField("",8); //section three code TextField setup_resultHighDoIt = new TextField("",8); TextField annual_resultHighDoIt = new TextField("",8); TextField total_resultHighDoIt = new TextField("",8); //section four code TextField setup_managed = new TextField("",8); TextField annual_managed = new TextField("",8); TextField total_managed = new TextField("",8); TextField total_locations = new TextField("",8); String add = " Calculate TCO! "; String mult = "Multiply"; String TotalCostPC = "Add All Locations"; String money = "money"; Button addButton = new Button(add); Label smallMedLarge = new Label(" # of Small sites # of Medium sites # of Large sites "); Label employees = new Label(" (1-25 employees) (26-100 employees) (100+ employees) "); Label openreach = new Label(" OpenReach"); Label solution = new Label(" solution: "); Label DIY= new Label(" "); Label lowDIY = new Label("Low End"); Label highEndDIY = new Label(" High End"); Label highDIY = new Label(" High End"); Label managed = new Label(" Managed VPN"); Label spacer1 = new Label(" "); Label spacer2 = new Label(" + "); Label spacer3 = new Label(" _______________________ "); Label spacer4 = new Label(" "); Label spacer5 = new Label(" "); //Label spacer0small = new Label(""); Label spacer1small = new Label(" "); Label spacer6 = new Label(" "); Label spacer7 = new Label(" "); Label spacer8 = new Label(" "); Label spacer9 = new Label(" "); Label setup_resultOR_label = new Label("Total Set-up Cost :"); Label annual_resultOR_label = new Label("Total Annual Cost :"); Label total_resultOR_label = new Label("Total Cost Year 1 :"); Label ErrorField; Label total_locations_label = new Label("Total Locations:"); public void init() { //label foreground and background color setting //input2.setColumns(2); setup_resultOR_label.setBackground(new Color(0,0,151)); annual_resultOR_label.setBackground(new java.awt.Color(0,0,151)); total_resultOR_label.setBackground(new java.awt.Color(0,0,151)); setup_resultOR_label.setForeground(Color.white); annual_resultOR_label.setForeground(Color.white); total_resultOR_label.setForeground(Color.white); smallMedLarge.setBackground(new java.awt.Color(0,0,151)); employees.setBackground(new java.awt.Color(0,0,151)); openreach.setBackground(new java.awt.Color(0,0,151)); smallMedLarge.setForeground(Color.white); employees.setForeground(Color.white); openreach.setForeground(Color.white); solution.setBackground(new java.awt.Color(0,0,151)); lowDIY.setBackground(new java.awt.Color(0,0,151)); solution.setForeground(Color.white); DIY.setBackground(new java.awt.Color(0,0,151)); DIY.setForeground(Color.white); lowDIY.setForeground(Color.white); highEndDIY.setBackground(new java.awt.Color(0,0,151)); highDIY.setBackground(new java.awt.Color(0,0,151)); managed.setBackground(new java.awt.Color(0,0,151)); highEndDIY.setForeground(Color.white); highDIY.setForeground(Color.white); managed.setForeground(Color.white); spacer1.setBackground(new java.awt.Color(0,0,151)); spacer2.setBackground(new java.awt.Color(0,0,151)); spacer3.setBackground(new java.awt.Color(0,0,151)); spacer4.setBackground(new java.awt.Color(0,0,151)); spacer5.setBackground(new java.awt.Color(0,0,151)); //spacer0small.setBackground(new java.awt.Color(0,0,151)); spacer1small.setBackground(new java.awt.Color(0,0,151)); spacer6.setBackground(new java.awt.Color(0,0,151)); spacer7.setBackground(new java.awt.Color(0,0,151)); spacer8.setBackground(new java.awt.Color(0,0,151)); spacer9.setBackground(new java.awt.Color(0,0,151)); spacer1.setForeground(Color.cyan); spacer2.setForeground(Color.white); spacer3.setForeground(Color.white); spacer4.setForeground(Color.white); spacer5.setForeground(Color.white); //spacer0small.setForeground(Color.white); spacer6.setForeground(Color.white); spacer7.setForeground(Color.white); spacer8.setForeground(Color.white); //textfield color setting input1.setBackground(Color.white); input2.setBackground(Color.white); input3.setBackground(Color.white); setup_resultOR.setBackground(Color.white); annual_resultOR.setBackground(Color.white); total_resultOR.setBackground(Color.white); setup_resultOR.setForeground(new java.awt.Color(255,105,0)); annual_resultOR.setForeground(new java.awt.Color(255,105,0)); total_resultOR.setForeground(new java.awt.Color(255,105,0)); setup_resultLowDoIt.setBackground(Color.white); annual_resultLowDoIt.setBackground(Color.white); total_resultLowDoIt.setBackground(Color.white); //setup_resultLowDoIt.setForeground(new java.awt.Color(209,209,252)); //annual_resultLowDoIt.setForeground(new java.awt.Color(209,209,252)); //total_resultLowDoIt.setForeground(new java.awt.Color(209,209,252)); setup_resultHighDoIt.setBackground(Color.white); annual_resultHighDoIt.setBackground(Color.white); total_resultHighDoIt.setBackground(Color.white); //setup_resultHighDoIt.setForeground(new java.awt.Color(209,209,252)); //annual_resultHighDoIt.setForeground(new java.awt.Color(209,209,252)); //total_resultHighDoIt.setForeground(new java.awt.Color(209,209,252)); setup_managed.setBackground(Color.white); annual_managed.setBackground(Color.white); total_managed.setBackground(Color.white); //setup_managed.setForeground(Color.black); //annual_managed.setForeground(Color.black); //total_managed.setForeground(Color.black); DIY.setForeground(new java.awt.Color(209,209,252)); lowDIY.setForeground(new java.awt.Color(209,209,252)); highDIY.setForeground(new java.awt.Color(189,189,248)); openreach.setForeground(new java.awt.Color(255,105,0)); //set font setFont(new Font("Arial",Font.BOLD,11)); //add all labels, textfields, and spacer labels input1.setText("0"); input2.setText("0"); input3.setText("0"); add(smallMedLarge); add(spacer6); add(input1); add(spacer7); add(input2); add(spacer8); add(input3); // add(spacer0small); add(spacer9); add(addButton); add(employees); add(spacer1); //setFont(new Font("Arial",Font.PLAIN,11)); //row 1 //add(spacer0small); //openreach.setColor(Color.orange); add(spacer1small); add(DIY); //row 0 add(openreach); add(lowDIY); add(highDIY); add(managed); //row 2 add(setup_resultOR_label); //twoDigits.format(setup_resultOR); setup_resultOR.setEditable( false ); add( setup_resultOR); add(setup_resultLowDoIt); setup_resultLowDoIt.setEditable( false ); add(setup_resultHighDoIt); setup_resultHighDoIt.setEditable( false ); add(setup_managed); setup_managed.setEditable( false ); //row 3 add(spacer2); add(annual_resultOR_label); add(annual_resultOR); annual_resultOR.setEditable( false ); add(annual_resultLowDoIt); annual_resultLowDoIt.setEditable( false ); add(annual_resultHighDoIt); annual_resultHighDoIt.setEditable( false ); add(annual_managed); annual_managed.setEditable( false ); //row 4 add(spacer3); add(total_resultOR_label); add(total_resultOR); total_resultOR.setEditable( false ); add(total_resultLowDoIt); total_resultLowDoIt.setEditable( false ); add(total_resultHighDoIt); total_resultHighDoIt.setEditable( false ); add(total_managed); total_managed.setEditable( false ); //this adds the images at bottom of calculator //swoop1 = getImage(getCodeBase(), "swoop1.gif"); //swoop2 = getImage(getCodeBase(), "swoop2.gif"); //the "calculate Costs" button addButton.addActionListener(new ButtonActionListener()); } class ButtonActionListener implements ActionListener{ //VARAIBLES FOR SECTION ONE - OPENREACH int in1 = 0; int in2 = 0; int in3 = 0; int out, out2, out10; int TotalCostPC; int connectivitySetupSmall, connectivitySetupLarge, totalIpServices; int smallORServices, mediumORServices, largeORServices, totalORServices; int smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity, totalAnnualCost; int totalCostYear1; //VARIABLES FOR SECTION TWO - LOW END DO-IT-YOURSELF int out3, out4; int vpnHardwareLowSmall, vpnHardwareLowMedium, vpnHardwareLowLarge, vpnHardwareLowTotal; int lowEndTotalSetup, lowEndTotalAnnual, supportLowEndTotal, supportLowEndSmall, supportLowEndMedium, supportLowEndLarge; int lowEndTotalCostYear1; //VARIABLES FOR SECTION THREE - HIGH END DO-IT-YOURSELF int out5, out6; int vpnHardwareHighTotal, vpnHardwareHighSmall, vpnHardwareHighMedium, vpnHardwareHighLarge, highEndTotalSetup; int supportHighEndSmall, supportHighEndMedium, supportHighEndLarge, supportHighEndTotal, highEndTotalAnnual; int highEndTotalCostYear1; //VARIABLES FOR SECTION FOUR - MANAGED VPN int out7, out8; int vpnHardwareManagedSmall, vpnHardwareManagedMedium, vpnHardwareManagedLarge, vpnHardwareManagedTotal; int firewallHardwareManagedSmall, firewallHardwareManagedMedium, firewallHardwareManagedLarge, firewallHardwareManagedTotal; int managedTotalCostYear1; //the following code error checks for the three input fields, //users can't enter in numbers more than 9999 class CustomException extends Exception { String error_message =""; public CustomException(String s){ error_message = s; } public String toString(){ return error_message; } } public void actionPerformed(ActionEvent event){ try { in1 = Integer.parseInt( input1.getText() ); //take the input and make it into an integer in2 = Integer.parseInt( input2.getText() ); in3 = Integer.parseInt( input3.getText() ); spacer1.setText(" "); if (in1 > 9999)throw new CustomException("Please enter a number between 0 and 9999 for your Small sites"); if (in2 > 9999)throw new CustomException("Please enter a number between 0 and 9999 for your Medium sites"); if (in3 > 9999)throw new CustomException("Please enter a number between 0 and 9999 for your Large sites"); } catch ( CustomException nfe ){ spacer1.setText(nfe.toString()); return; } catch ( NumberFormatException nfe ){ spacer1.setText("Please enter numbers only in the three fields above. "); return; } //BEGIN CODE FOR THE THREE OUTPUT TEXTFIELDS IN THE GUI - SECTION ONE if ((event.getActionCommand()).equals(add)){ out = totalSetupCost(TotalCostPC, totalIpServices(connectivitySetupSmall, connectivitySetupLarge)); out2 = totalAnnualCost(totalORServices(smallORServices, mediumORServices, largeORServices), totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity)); totalCostYear1 = out + out2; //BEGIN CODE FOR THE THREE OUTPUT TEXTFIELDS IN THE GUI - SECTION TWO out3 = lowEndTotalSetup(vpnHardwareLowTotal, totalIpServices); out4 = lowEndTotalAnnual(supportLowEndTotal(supportLowEndSmall, supportLowEndMedium, supportLowEndLarge), totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity)); lowEndTotalCostYear1 = out3 + out4; //BEGIN CODE FOR THE OUTPUT TEXTFIELDS IN THE GUI - SECTION THREE out5 = highEndTotalSetup(vpnHardwareHighTotal(vpnHardwareHighSmall, vpnHardwareHighMedium, vpnHardwareHighLarge), totalIpServices(connectivitySetupSmall, connectivitySetupLarge)); out6 = highEndTotalAnnual(supportHighEndTotal(supportHighEndSmall, supportHighEndMedium, supportHighEndLarge), totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity)); highEndTotalCostYear1 = out5 + out6; //BEGIN CODE FOR THE OUTPUT TEXTFIELDS IN THE GUI - SECTION FOUR out7 = managedSetupCost(vpnHardwareManagedTotal(vpnHardwareManagedSmall, vpnHardwareManagedMedium, vpnHardwareManagedLarge), firewallHardwareManagedTotal(firewallHardwareManagedSmall, firewallHardwareManagedMedium, firewallHardwareManagedLarge), totalIpServices(connectivitySetupSmall, connectivitySetupLarge)); out8 = totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity); managedTotalCostYear1 = out7 + out8; } //this creates an object that allow me to format the results with decimals and dollar sign DecimalFormat twoDigits = new DecimalFormat( "$,000" ); //THIS FIRST SECTION OF CODE REPRESENTS THE ESTIMATED COST //THIS PRINTS THE RESULTS FOR OR SOLUTION //the next three lines of code is one way to print out the results //setup_resultOR.setText(Integer.toString(out)); //annual_resultOR.setText(Integer.toString(out2)); //total_resultOR.setText(Integer.toString(totalCostYear1)); //I'm printing it out the results this way so I can use the twoDigits object I created above setup_resultOR.setText( String.valueOf(twoDigits.format( out ) ) ); annual_resultOR.setText( String.valueOf(twoDigits.format( out2 ) ) ); total_resultOR.setText( String.valueOf(twoDigits.format( totalCostYear1 ) ) ); //THIS PRINTS THE RESULTS FOR LOW END DIY setup_resultLowDoIt.setText( String.valueOf(twoDigits.format( out3 ) ) ); annual_resultLowDoIt.setText( String.valueOf(twoDigits.format( out4 ) ) ); total_resultLowDoIt.setText( String.valueOf(twoDigits.format( lowEndTotalCostYear1 ) ) ); //THIS PRINTS THE RESULTS FOR HIGH END DIY setup_resultHighDoIt.setText( String.valueOf(twoDigits.format( out5 ) ) ); annual_resultHighDoIt.setText( String.valueOf(twoDigits.format( out6 ) ) ); total_resultHighDoIt.setText( String.valueOf(twoDigits.format( highEndTotalCostYear1 ) ) ); //THIS PRINTS THE RESULTS FOR MANAGED VPN setup_managed.setText( String.valueOf(twoDigits.format( out7 ) ) ); annual_managed.setText( String.valueOf(twoDigits.format( out8 ) ) ); total_managed.setText( String.valueOf(twoDigits.format( managedTotalCostYear1 ) ) ); repaint(); } //BEGIN CODE FOR OR SETUP COSTS int TotalCostPC(int a, int b, int c){ //this adds up all locations and multiplies //by (priceOfPC 700), the assumed average cost of a PC in1 = a; //for TCOCalc cell D17 in2 = b; in3 = c; TotalCostPC = (a+b+c)*priceOfPC; return(TotalCostPC); } int connectivitySetupLarge(int a, int b){ //this assumes a large T1 setup costs (largeT1=2000) and large IP services //for a T1 cost 4x (largeT1=2000) which equals 8000 in3 = a; //for control page cell I22 b = largeT1*4; connectivitySetupLarge = a*b; return(connectivitySetupLarge); } int connectivitySetupSmall(int a, int b){ //this assumes a small location cable setup costs (smallCable=50) //for IP services which equals this constant of (smallCable=50) in1 = a; //for control page cell I20 b = smallCable; connectivitySetupSmall = a*b; return(connectivitySetupSmall); } int totalIpServices(int a, int b){ //this adds connectivitySetupSmall and connectivitySetupLarge a = connectivitySetupSmall(in1,smallCable); //for total IP services cost control page I20+I22 b = connectivitySetupLarge(in3,(largeT1*4)); return a+b; } int totalSetupCost(int a, int b){ //this comes up with the total setup cost for TCOCalc cell C34 a = TotalCostPC(in1, in2, in3); b = totalIpServices(connectivitySetupSmall, connectivitySetupLarge); return a+b; } //BEGIN CODE FOR TOTAL OR ANNUAL COST int smallORServices(int a, int b){ //this multiplys the constant (smallORPrice 1428) with numbers of small locations //gives result for Control Page cell H5 for OR services in1 = a; b = smallORPrice; smallORServices = a*b; return (smallORServices); } int mediumORServices(int a, int b){ //this multiplys the constant (mediumORPrice 4428) with numbers of medium locations //gives result for Control Page H6 for OR services in2 = a; b = mediumORPrice; mediumORServices = a*b; return (mediumORServices); } int largeORServices(int a, int b){ //this multiplys the constant (largeORPrice 7188) with numbers of large locations //gives result for Control Page H7 for OR services in3 = a; b = largeORPrice; largeORServices = a*b; return (largeORServices); } int totalORServices(int a, int b, int c){ //this adds above three methods results to give //the total cost of OR services for all locations a = smallORServices(in1,smallORPrice); //gives result for TCOCalc cell D17 b = mediumORServices(in2,mediumORPrice); c = largeORServices(in3,largeORPrice); return a+b+c; } int smallAnnualConnectivity(int a, int b){ //this assumes the monthly charge for cable for small //locations is (smallAnnualCable 480) times 12 months is the constant 480 in1 = a; //for TCOCalc cell K20 b = smallAnnualCable; //480 come from 40 * 12 months smallAnnualConnectivity = a*b; return(smallAnnualConnectivity); } int mediumAnnualConnectivity(int a, int b){ //this assumes the monthly charge for SDSL for medium //locations is (mediumAnnualSDSL 2388) times 12 months is the constant 2388 in2 = a; //for TCOCalc cell K21 b = mediumAnnualSDSL; //2388 comes from 199 * 12 months mediumAnnualConnectivity = a*b; return(mediumAnnualConnectivity); } int largeAnnualConnectivity(int a, int b){ //this assumes the monthly charge for T1 for large //locations is (largeAnnualT1 38400) times 12 months is 9600 in3 = a; //and it is for a T1 x 4 which b = largeAnnualT1; //equals the constant of 38400 largeAnnualConnectivity = a*b; //for TCOCalc cell K22 return(largeAnnualConnectivity); //38400 comes from (800 * 12 months) * 4 } int totalAnnualConnectivity(int a, int b, int c){ //this adds up the results of above three methods a = smallAnnualConnectivity(in1, smallAnnualCable); //for TCOCalc cell K23 b = mediumAnnualConnectivity(in2, mediumAnnualSDSL); c = largeAnnualConnectivity(in3, largeAnnualT1); return a+b+c; } int totalAnnualCost(int a, int b){ a = totalORServices(smallORServices, mediumORServices, largeORServices); b = totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity); return a+b; //this adds up the totalORServices //with the totalAnnualConnectivity } //for TCOCalc D34 //THIS SECOND SECTION OF CODE REPRESENTS THE LOW END DO-IT-YOURSELF VPN SOLUTION //BEGIN CODE FOR TOTAL SETUP COST LOW END DO-IT-YOURSELF int vpnHardwareLowSmall(int a, int b){ //this multiplys the constant (watchgaurdFirebox 4990) with # of small locations //gives result for Control Page D17 for Watchgaurd Firebox II in1 = a; b = watchgaurdFirebox; return a*b; } int vpnHardwareLowMedium(int a, int b){ //this multiplys the constant (watchgaurdFireboxPlus 9990) with # of medium locations //gives result for for Control Page D18 for Watchgaurd Firebox II Plus in2 = a; b = watchgaurdFireboxPlus; return a*b; } int vpnHardwareLowLarge(int a, int b){ //this multiplys the constant (watchgaurdFireboxFast 12990) with # of large locations //gives result for for Control Page D19 for Firebox II Fast VPN in3 = a; b = watchgaurdFireboxFast; return a*b; } int vpnHardwareLowTotal(int a, int b, int c){ //this adds above three methods rusults to give //the total cost of all routers for all locations a = vpnHardwareLowSmall(in1,watchgaurdFirebox); //gives result for TCO Calc cell C24 b = vpnHardwareLowMedium(in2,watchgaurdFireboxPlus); c = vpnHardwareLowLarge(in3,watchgaurdFireboxFast); return a+b+c; } //BEGIN CODE FOR LOW END DO-IT-YOURSELF TOTAL SETUP COST int lowEndTotalSetup(int a, int b){ a = vpnHardwareLowTotal(vpnHardwareLowSmall, vpnHardwareLowMedium, vpnHardwareLowLarge); b = totalIpServices(connectivitySetupSmall, connectivitySetupLarge); return a+b + managementSoftwareLow + authenticationCosts; //this adds everything up in TCOCalc colume E for cell E34 } //it assumes the constant (id management(software) 3995) //it also assumes the constant (authenticationCosts 14800) is the total //authentification costs for hardware and software CA //LOW END DO-IT-YOURSELF TOTAL ANNUAL COST int supportLowEndSmall(int a, int b){ //this multiplys the constant (watchgaurdSupportSmall 995) with # of small locations //gives result for Control Page J32 for Watchgaurd support in1 = a; b = watchgaurdSupportSmall; return a*b; } int supportLowEndMedium(int a, int b){ //this multiplys the constant (watchgaurdSupportMedium 1495) with # of small locations //gives result for Control Page K32 for Watchgaurd support in2 = a; b = watchgaurdSupportMedium; return a*b; } int supportLowEndLarge(int a, int b){ //this multiplys the constant (watchgaurdSupportLarge 1495) with # of small locations //gives result for Control Page L32 for Watchgaurd support in3 = a; b = watchgaurdSupportLarge; return a*b; } int supportLowEndTotal(int a, int b, int c){ //this adds above three methods rusults to give //the total cost of all low end support for all a = supportLowEndSmall(in1,watchgaurdSupportSmall); //locations gives result for Control Page cell M41 b = supportLowEndMedium(in2,watchgaurdSupportMedium); c = supportLowEndLarge(in3,watchgaurdSupportLarge); return a+b+c; } //ADD UP TCOCALC COLUMN F FOR TOTAL LOW END DO-IT-YOURSELF ANNUAL COST int lowEndTotalAnnual(int a, int b){ a = supportLowEndTotal(supportLowEndSmall, supportLowEndMedium, supportLowEndLarge); b = totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity); return a+b + managementLabor; //this adds everything up in TCOCalc colume F for cell F35 } //it assumes the constant (managementLabor) 70000) //THIS THIRD SECTION OF CODE REPRESENTS THE HIGH END DO-IT-YOURSELF VPN SOLUTION //BEGIN CODE OF VPN HARDWARE SETUP COSTS HIGH END DIY int vpnHardwareHighSmall(int a, int b){ //this multiplys the constant (checkpointFirewallSmall 10500) with # of small locations //gives result for Control Page D28 for Checkpoint Firewall small //10500 comes from 7500 + 3000. in1 = a; b = checkpointFirewallSmall; return a*b; } int vpnHardwareHighMedium(int a, int b){ //this multiplys the constant (checkpointFirewallMedium 47500) with # of medium locations //gives result for for Control Page D29 for Checkpoint Firewall medium in2 = a; //47500 comes from 7500+(150*200)+10000. b = checkpointFirewallMedium; return a*b; } int vpnHardwareHighLarge(int a, int b){ //this multiplys the constant (checkpointFirewallLarge 92500) with # of large locations //gives result for for Control Page D30 for Checkpoint Firewall large in3 = a; //92500 comes from 7500+(150*500)+10000. b = checkpointFirewallLarge; return a*b; } int vpnHardwareHighTotal(int a, int b, int c){ //this adds above three methods rusults to give //the total cost of all routers for all locations a = vpnHardwareHighSmall(in1,checkpointFirewallSmall); //gives result for TCO Calc cell C24 b = vpnHardwareHighMedium(in2,checkpointFirewallMedium); c = vpnHardwareHighLarge(in3,checkpointFirewallLarge); return a+b+c; } //BEGIN CODE FOR HIGH END DIY TOTAL SETUP COST int highEndTotalSetup(int a, int b){ a = vpnHardwareHighTotal(vpnHardwareHighSmall, vpnHardwareHighMedium, vpnHardwareHighLarge); b = totalIpServices(connectivitySetupSmall, connectivitySetupLarge); return a+b + managementSoftwareHigh + authenticationCosts; //this adds everything up in TCOCalc colume G for cell G34 } //it assumes the constant (managementSoftwareHigh 12000) is for support(labor) high end //and also assumes the constant of (authenticationCosts 14800) //BEGIN CODE FOR HIGH END DIY TOTAL ANNUAL COST int supportHighEndSmall(int a, int b){ //this multiplys the constant (checkpointSupportSmall 3675) with # of small locations //gives result for Control Page J31 for Watchgaurd support in1 = a; b = checkpointSupportSmall; return a*b; } int supportHighEndMedium(int a, int b){ //this multiplys the constant (checkpointSupportMedium 16625) with # of small locations //gives result for Control Page K31 for Watchgaurd support in2 = a; b = checkpointSupportMedium; return a*b; } int supportHighEndLarge(int a, int b){ //this multiplys the constant (checkpointSupportLarge 32375) with # of small locations //gives result for Control Page L31 for Watchgaurd support in3 = a; b = checkpointSupportLarge; return a*b; } int supportHighEndTotal(int a, int b, int c){ //this adds above three methods rusults to give //the total cost of all low end support for all a = supportHighEndSmall(in1,checkpointSupportSmall); //locations gives result for Control Page cell M41 b = supportHighEndMedium(in2,checkpointSupportMedium); c = supportHighEndLarge(in3,checkpointSupportLarge); return a+b+c; } //BEGIN CODE FOR HIGH END DIY TOTAL ANNUAL COST int highEndTotalAnnual(int a, int b){ a = supportHighEndTotal(supportHighEndSmall, supportHighEndMedium, supportHighEndLarge); b = totalAnnualConnectivity(smallAnnualConnectivity, mediumAnnualConnectivity, largeAnnualConnectivity); return a+b + managementLabor; //this adds everything up in TCOCalc colume H for cell H35 } //it assumes the constant (managementLabor 70000) is for management(labor) //THIS FOURTH SECTION OF CODE REPRESENTS THE MANAGED VPN SOLUTION //BEGIN CODE OF MANAGED VPN HARDWARE SETUP COSTS int vpnHardwareManagedSmall(int a, int b){ //this multiplys the constant (managedServicesHardwareSmall 2780) with # of small locations //gives result for Control Page E44 for managed services MyCIO in1 = a; b = managedServicesHardwareSmall; return a*b; } int vpnHardwareManagedMedium(int a, int b){ //this multiplys the constant (managedServicesHardwareMedium 3595) with # of medium locations //gives result for for Control Page F44 for managed services MyCIO in2 = a; b = managedServicesHardwareMedium; return a*b; } int vpnHardwareManagedLarge(int a, int b){ //this multiplys the constant (managedServicesHardwareLarge 4670) with # of large locations //gives result for for Control Page G44 for managed services MyCIO in3 = a; b = managedServicesHardwareLarge; return a*b; } int vpnHardwareManagedTotal(int a, int b, int c){ //this adds above three methods rusults to give //the total cost of all managed services //hardware for all locations a = vpnHardwareManagedSmall(in1,managedServicesHardwareSmall); //gives result for TCO Calc cell I17 b = vpnHardwareManagedMedium(in2,managedServicesHardwareMedium); c = vpnHardwareManagedLarge(in3,managedServicesHardwareLarge); return a+b+c; } //BEGIN CODE TO FIGURE OUT HARDWARE COSTS FOR CHECKPOINT FIREWALLS //this section of code uses the same constants in the Excel TCO Calc //as the VPN HARDWARE section above. See VPN HARDWARE section above //for explainations of the constants int firewallHardwareManagedSmall(int a, int b){ //this multiplys the constant (checkpointFirewallSmall 10500) with # of small locations //gives result for Control Page C28 for managed services Checkpoint firewall in1 = a; b = checkpointFirewallSmall; return a*b; } int firewallHardwareManagedMedium(int a, int b){ //this multiplys the constant (checkpointFirewallMedium 47500) with # of medium locations //gives result for for Control Page C29 for managed services Checkpoint firewall in2 = a; b = checkpointFirewallMedium; return a*b; } int firewallHardwareManagedLarge(int a, int b){ //this multiplys the constant (checkpointFirewallLarge 92500) with # of large locations //gives result for for Control Page C30 for managed services Checkpoint firewall in3 = a; b = checkpointFirewallLarge; return a*b; } int firewallHardwareManagedTotal(int a, int b, int c){ //this adds above three methods rusults to give //the total cost of all managed services //hardware for all locations a = firewallHardwareManagedSmall(in1,checkpointFirewallSmall); //gives result for TCO Calc cell I17 b = firewallHardwareManagedMedium(in2,checkpointFirewallMedium); c = firewallHardwareManagedLarge(in3,checkpointFirewallLarge); return a+b+c; } //BEGIN CODE TO ADD TOTAL FOR MANAGED VPN SETUP COST int managedSetupCost(int a, int b, int c){ a = vpnHardwareManagedTotal(vpnHardwareManagedSmall, vpnHardwareManagedMedium, vpnHardwareManagedLarge); b = firewallHardwareManagedTotal(firewallHardwareManagedSmall, firewallHardwareManagedMedium, firewallHardwareManagedLarge); c = totalIpServices(connectivitySetupSmall, connectivitySetupLarge); return a+b+c; //this adds everything up in TCOCalc colume I for cell I34 } } public void paint(Graphics g) { /* int i; String ExceptionCaught = "Demo"; for (i = 1; i <= 3; i++) { try { ThrowOne(i); } catch(ExceptionOne e) { ExceptionCaught = "ExceptionOne"; } catch(ExceptionTwo e) { ExceptionCaught = "ExceptionTwo"; } catch(ExceptionThree e) { ExceptionCaught = "ExceptionThree"; } g.drawString(ExceptionCaught, 5, 15*i); } */ //setBackground(new java.awt.Color(0,0,151)); setBackground(new java.awt.Color(0,0,151)); //g.drawImage(swoop1, 0, 290, this); //g.drawImage(swoop2, 425, 290, this); } int addInt(int a, int b){ return a+b; } int multInt(int a, int b){ return a*b; } }