UOG GPA Calculator

  1. using System;  
  2. using System.Collections.Generic;  
  3. using System.ComponentModel;  
  4. using System.Data;  
  5. using System.Drawing;  
  6. using System.Linq;  
  7. using System.Text;  
  8. using System.Windows.Forms;  
  9.   
  10. namespace gpa {  
  11.     public partial class Form1: Form {  
  12.         float a1, a2, a3, a4, a5, a6, a7, a8 = 0;  
  13.         float b1, b2, b3, b4, b5, b6, b7, b8 = 0;  
  14.         float s1 = 0;  
  15.         float s2 = 0;  
  16.         float s3 = 0;  
  17.         float s4 = 0;  
  18.         float s5 = 0;  
  19.         float s6 = 0;  
  20.         float s7 = 0;  
  21.         float s8 = 0;  
  22.         float total = 0;  
  23.         float gpa = 0;  
  24.         float total_crdits = 0;  
  25.         private void Form1_Load(object sender, EventArgs e) {  
  26.             check1();  
  27.             check2();  
  28.             check3();  
  29.             check4();  
  30.             check5();  
  31.             check6();  
  32.             check7();  
  33.             check8();  
  34.             ////////////////////////////////////////  
  35.   
  36.             comboBox1.Items.Add("0.00 - 48.99");  
  37.             comboBox1.Items.Add("49 - 54.49");  
  38.             comboBox1.Items.Add("54.50 - 59.49");  
  39.             comboBox1.Items.Add("59.50 - 64.49");  
  40.             comboBox1.Items.Add("64.50 - 69.49");  
  41.             comboBox1.Items.Add("69.50 - 74.49");  
  42.             comboBox1.Items.Add("74.50 - 79.49");  
  43.             comboBox1.Items.Add("79.50 - 84.49");  
  44.             comboBox1.Items.Add("84.50 - 100");  
  45.             /////////////////////////////////////////////  
  46.             comboBox4.Items.Add("0.00 - 48.99");  
  47.             comboBox4.Items.Add("49 - 54.49");  
  48.             comboBox4.Items.Add("54.50 - 59.49");  
  49.             comboBox4.Items.Add("59.50 - 64.49");  
  50.             comboBox4.Items.Add("64.50 - 69.49");  
  51.             comboBox4.Items.Add("69.50 - 74.49");  
  52.             comboBox4.Items.Add("74.50 - 79.49");  
  53.             comboBox4.Items.Add("79.50 - 84.49");  
  54.             comboBox4.Items.Add("84.50 - 100");  
  55.             /////////////////////////////////////////////  
  56.             comboBox7.Items.Add("0.00 - 48.99");  
  57.             comboBox7.Items.Add("49 - 54.49");  
  58.             comboBox7.Items.Add("54.50 - 59.49");  
  59.             comboBox7.Items.Add("59.50 - 64.49");  
  60.             comboBox7.Items.Add("64.50 - 69.49");  
  61.             comboBox7.Items.Add("69.50 - 74.49");  
  62.             comboBox7.Items.Add("74.50 - 79.49");  
  63.             comboBox7.Items.Add("79.50 - 84.49");  
  64.             comboBox7.Items.Add("84.50 - 100");  
  65.             ///////////////////////////////////////////////  
  66.             comboBox10.Items.Add("0.00 - 48.99");  
  67.             comboBox10.Items.Add("49 - 54.49");  
  68.             comboBox10.Items.Add("54.50 - 59.49");  
  69.             comboBox10.Items.Add("59.50 - 64.49");  
  70.             comboBox10.Items.Add("64.50 - 69.49");  
  71.             comboBox10.Items.Add("69.50 - 74.49");  
  72.             comboBox10.Items.Add("74.50 - 79.49");  
  73.             comboBox10.Items.Add("79.50 - 84.49");  
  74.             comboBox10.Items.Add("84.50 - 100");  
  75.             ////////////////////////////////////////////////  
  76.             comboBox13.Items.Add("0.00 - 48.99");  
  77.             comboBox13.Items.Add("49 - 54.49");  
  78.             comboBox13.Items.Add("54.50 - 59.49");  
  79.             comboBox13.Items.Add("59.50 - 64.49");  
  80.             comboBox13.Items.Add("64.50 - 69.49");  
  81.             comboBox13.Items.Add("69.50 - 74.49");  
  82.             comboBox13.Items.Add("74.50 - 79.49");  
  83.             comboBox13.Items.Add("79.50 - 84.49");  
  84.             comboBox13.Items.Add("84.50 - 100");  
  85.             ////////////////////////////////////////////////  
  86.             comboBox17.Items.Add("0.00 - 48.99");  
  87.             comboBox17.Items.Add("49 - 54.49");  
  88.             comboBox17.Items.Add("54.50 - 59.49");  
  89.             comboBox17.Items.Add("59.50 - 64.49");  
  90.             comboBox17.Items.Add("64.50 - 69.49");  
  91.             comboBox17.Items.Add("69.50 - 74.49");  
  92.             comboBox17.Items.Add("74.50 - 79.49");  
  93.             comboBox17.Items.Add("79.50 - 84.49");  
  94.             comboBox17.Items.Add("84.50 - 100");  
  95.             //////////////////////////////////////////////////  
  96.             comboBox19.Items.Add("0.00 - 48.99");  
  97.             comboBox19.Items.Add("49 - 54.49");  
  98.             comboBox19.Items.Add("54.50 - 59.49");  
  99.             comboBox19.Items.Add("59.50 - 64.49");  
  100.             comboBox19.Items.Add("64.50 - 69.49");  
  101.             comboBox19.Items.Add("69.50 - 74.49");  
  102.             comboBox19.Items.Add("74.50 - 79.49");  
  103.             comboBox19.Items.Add("79.50 - 84.49");  
  104.             comboBox19.Items.Add("84.50 - 100");  
  105.             //////////////////////////////////////////////////  
  106.             comboBox24.Items.Add("0.00 - 48.99");  
  107.             comboBox24.Items.Add("49 - 54.49");  
  108.             comboBox24.Items.Add("54.50 - 59.49");  
  109.             comboBox24.Items.Add("59.50 - 64.49");  
  110.             comboBox24.Items.Add("64.50 - 69.49");  
  111.             comboBox24.Items.Add("69.50 - 74.49");  
  112.             comboBox24.Items.Add("74.50 - 79.49");  
  113.             comboBox24.Items.Add("79.50 - 84.49");  
  114.             comboBox24.Items.Add("84.50 - 100");  
  115.             ///////////////////////////////////////////////////////////  
  116.   
  117.   
  118.             comboBox2.Items.Add(1);  
  119.             comboBox2.Items.Add(2);  
  120.             comboBox2.Items.Add(3);  
  121.             comboBox2.Items.Add(4);  
  122.             comboBox2.Items.Add(5);  
  123.             comboBox2.Items.Add(6);  
  124.             ///////////////////////////////////////////////////  
  125.             comboBox5.Items.Add(1);  
  126.             comboBox5.Items.Add(2);  
  127.             comboBox5.Items.Add(3);  
  128.             comboBox5.Items.Add(4);  
  129.             comboBox5.Items.Add(5);  
  130.             comboBox5.Items.Add(6);  
  131.             ///////////////////////////////////////////////  
  132.             comboBox8.Items.Add(1);  
  133.             comboBox8.Items.Add(2);  
  134.             comboBox8.Items.Add(3);  
  135.             comboBox8.Items.Add(4);  
  136.             comboBox8.Items.Add(5);  
  137.             comboBox8.Items.Add(6);  
  138.             ////////////////////////////////////////  
  139.             comboBox11.Items.Add(1);  
  140.             comboBox11.Items.Add(2);  
  141.             comboBox11.Items.Add(3);  
  142.             comboBox11.Items.Add(4);  
  143.             comboBox11.Items.Add(5);  
  144.             comboBox11.Items.Add(6);  
  145.             ///////////////////////////////////////  
  146.             comboBox14.Items.Add(1);  
  147.             comboBox14.Items.Add(2);  
  148.             comboBox14.Items.Add(3);  
  149.             comboBox14.Items.Add(4);  
  150.             comboBox14.Items.Add(5);  
  151.             comboBox14.Items.Add(6);  
  152.             //////////////////////////////////////  
  153.             comboBox16.Items.Add(1);  
  154.             comboBox16.Items.Add(2);  
  155.             comboBox16.Items.Add(3);  
  156.             comboBox16.Items.Add(4);  
  157.             comboBox16.Items.Add(5);  
  158.             comboBox16.Items.Add(6);  
  159.             ////////////////////////////////////  
  160.             comboBox20.Items.Add(1);  
  161.             comboBox20.Items.Add(2);  
  162.             comboBox20.Items.Add(3);  
  163.             comboBox20.Items.Add(4);  
  164.             comboBox20.Items.Add(5);  
  165.             comboBox20.Items.Add(6);  
  166.             ////////////////////////////////////////////  
  167.             comboBox22.Items.Add(1);  
  168.             comboBox22.Items.Add(2);  
  169.             comboBox22.Items.Add(3);  
  170.             comboBox22.Items.Add(4);  
  171.             comboBox22.Items.Add(5);  
  172.             comboBox22.Items.Add(6);  
  173.             ///////////////////////////////////////////  
  174.   
  175.   
  176.   
  177.         }  
  178.         public Form1() {  
  179.             InitializeComponent();  
  180.         }  
  181.   
  182.         private void button1_Click(object sender, EventArgs e) {  
  183.   
  184.             if (comboBox2.Text == " ") {  
  185.                 comboBox2.Text = "0";  
  186.             }  
  187.             if (comboBox5.Text == " ") {  
  188.                 comboBox5.Text = "0";  
  189.             }  
  190.             if (comboBox8.Text == " ") {  
  191.                 comboBox8.Text = "0";  
  192.             }  
  193.             if (comboBox11.Text == " ") {  
  194.                 comboBox11.Text = "0";  
  195.             }  
  196.             if (comboBox14.Text == " ") {  
  197.                 comboBox14.Text = "0";  
  198.             }  
  199.             if (comboBox16.Text == " ") {  
  200.                 comboBox16.Text = "0";  
  201.             }  
  202.             if (comboBox20.Text == " ") {  
  203.                 comboBox20.Text = "0";  
  204.             }  
  205.             if (comboBox22.Text == " ") {  
  206.                 comboBox22.Text = "0";  
  207.             }  
  208.             ////////////////////////////////////////  
  209.             if (comboBox1.Text == " ") {  
  210.                 comboBox1.Text = "0";  
  211.             }  
  212.             if (comboBox4.Text == " ") {  
  213.                 comboBox4.Text = "0";  
  214.             }  
  215.             if (comboBox7.Text == " ") {  
  216.                 comboBox7.Text = "0";  
  217.             }  
  218.             if (comboBox10.Text == " ") {  
  219.                 comboBox10.Text = "0";  
  220.             }  
  221.             if (comboBox13.Text == " ") {  
  222.                 comboBox13.Text = "0";  
  223.             }  
  224.             if (comboBox17.Text == " ") {  
  225.                 comboBox17.Text = "0";  
  226.             }  
  227.             if (comboBox19.Text == " ") {  
  228.                 comboBox19.Text = "0";  
  229.             }  
  230.             if (comboBox24.Text == " ") {  
  231.                 comboBox24.Text = "0";  
  232.             }  
  233.             ////////////////////////////////////////////////  
  234.             if (textBox1.Text == " ") {  
  235.                 textBox1.Text = "0";  
  236.             }  
  237.             if (textBox2.Text == " ") {  
  238.                 textBox2.Text = "0";  
  239.             }  
  240.             if (textBox3.Text == " ") {  
  241.                 textBox3.Text = "0";  
  242.             }  
  243.             if (textBox4.Text == " ") {  
  244.                 textBox4.Text = "0";  
  245.             }  
  246.             if (textBox5.Text == " ") {  
  247.                 textBox5.Text = "0";  
  248.             }  
  249.             if (textBox6.Text == " ") {  
  250.                 textBox6.Text = "0";  
  251.             }  
  252.             if (textBox7.Text == " ") {  
  253.                 textBox7.Text = "0";  
  254.             }  
  255.             if (textBox8.Text == " ") {  
  256.                 textBox8.Text = "0";  
  257.             }  
  258.             if (textBox9.Text == " ") {  
  259.                 textBox9.Text = "0";  
  260.             }  
  261.             if (textBox10.Text == " ") {  
  262.                 textBox10.Text = "0";  
  263.             }  
  264.             if (textBox11.Text == " ") {  
  265.                 textBox11.Text = "0";  
  266.             }  
  267.             if (textBox12.Text == " ") {  
  268.                 textBox12.Text = "0";  
  269.             }  
  270.             if (textBox13.Text == " ") {  
  271.                 textBox13.Text = "0";  
  272.             }  
  273.             if (textBox14.Text == " ") {  
  274.                 textBox14.Text = "0";  
  275.             }  
  276.             if (textBox15.Text == " ") {  
  277.                 textBox15.Text = "0";  
  278.             }  
  279.             if (textBox16.Text == " ") {  
  280.                 textBox16.Text = "0";  
  281.             }  
  282.   
  283.             /////////////////////////////////////////////////////////////  
  284.   
  285.             if (comboBox1.Text == "0.00 - 48.99") {  
  286.                 textBox1.Text = "0.00";  
  287.                 textBox9.Text = "F";  
  288.             } else if (comboBox1.Text == "49 - 54.49") {  
  289.                 textBox1.Text = "1.0";  
  290.                 textBox9.Text = "D";  
  291.             } else if (comboBox1.Text == "54.50 - 59.49") {  
  292.                 textBox1.Text = "1.5";  
  293.                 textBox9.Text = "C";  
  294.             } else if (comboBox1.Text == "59.50 - 64.49") {  
  295.                 textBox1.Text = "2.0";  
  296.                 textBox9.Text = "C+";  
  297.             } else if (comboBox1.Text == "64.50 - 69.49") {  
  298.                 textBox1.Text = "2.5";  
  299.                 textBox9.Text = "B-";  
  300.             } else if (comboBox1.Text == "69.50 - 74.49") {  
  301.                 textBox1.Text = "3.0";  
  302.                 textBox9.Text = "B";  
  303.             } else if (comboBox1.Text == "74.50 - 79.49") {  
  304.                 textBox1.Text = "3.4";  
  305.                 textBox9.Text = "B+";  
  306.             } else if (comboBox1.Text == "79.50 - 84.49") {  
  307.                 textBox1.Text = "3.7";  
  308.                 textBox9.Text = "A";  
  309.             } else if (comboBox1.Text == "84.50 - 100") {  
  310.                 textBox1.Text = "4.0";  
  311.                 textBox9.Text = "A+";  
  312.             } else if (comboBox1.Text == " ") {  
  313.                 textBox1.Text = "0";  
  314.                 textBox9.Text = "0";  
  315.             } else {  
  316.                 textBox1.Text = "0";  
  317.                 textBox9.Text = "0";  
  318.             }  
  319.             /////////////////////////////////////////////////////////////////combobox1 end  
  320.   
  321.             if (comboBox4.Text == "0.00 - 48.99") {  
  322.                 textBox2.Text = "0.0";  
  323.                 textBox10.Text = "F";  
  324.             } else if (comboBox4.Text == "49 - 54.49") {  
  325.                 textBox2.Text = "1.0";  
  326.                 textBox10.Text = "D";  
  327.             } else if (comboBox4.Text == "54.50 - 59.49") {  
  328.                 textBox2.Text = "1.5";  
  329.                 textBox10.Text = "C";  
  330.             } else if (comboBox4.Text == "59.50 - 64.49") {  
  331.                 textBox2.Text = "2.0";  
  332.                 textBox10.Text = "C+";  
  333.             } else if (comboBox4.Text == "64.50 - 69.49") {  
  334.                 textBox2.Text = "2.5";  
  335.                 textBox10.Text = "B-";  
  336.             } else if (comboBox4.Text == "69.50 - 74.49") {  
  337.                 textBox2.Text = "3.0";  
  338.                 textBox10.Text = "B";  
  339.             } else if (comboBox4.Text == "74.50 - 79.49") {  
  340.                 textBox2.Text = "3.4";  
  341.                 textBox10.Text = "B+";  
  342.             } else if (comboBox4.Text == "79.50 - 84.49") {  
  343.                 textBox2.Text = "3.7";  
  344.                 textBox10.Text = "A";  
  345.             } else if (comboBox4.Text == "84.50 - 100") {  
  346.                 textBox2.Text = "4.0";  
  347.                 textBox10.Text = "A+";  
  348.             } else if (comboBox4.Text == " ") {  
  349.                 textBox2.Text = "0";  
  350.                 textBox10.Text = "0";  
  351.             } else {  
  352.                 textBox2.Text = "0";  
  353.                 textBox10.Text = "0";  
  354.             }  
  355.             //////////////////////////////////////////////////////////////combobox4 end  
  356.             if (comboBox7.Text == "0.00 - 48.99") {  
  357.                 textBox3.Text = "0.0";  
  358.                 textBox11.Text = "F";  
  359.             } else if (comboBox7.Text == "49 - 54.49") {  
  360.                 textBox3.Text = "1.0";  
  361.                 textBox11.Text = "D";  
  362.             } else if (comboBox7.Text == "54.50 - 59.49") {  
  363.                 textBox3.Text = "1.5";  
  364.                 textBox11.Text = "C";  
  365.             } else if (comboBox7.Text == "59.50 - 64.49") {  
  366.                 textBox3.Text = "2.0";  
  367.                 textBox11.Text = "C+";  
  368.             } else if (comboBox7.Text == "64.50 - 69.49") {  
  369.                 textBox3.Text = "2.5";  
  370.                 textBox11.Text = "B-";  
  371.             } else if (comboBox7.Text == "69.50 - 74.49") {  
  372.                 textBox3.Text = "3.0";  
  373.                 textBox11.Text = "B";  
  374.             } else if (comboBox7.Text == "74.50 - 79.49") {  
  375.                 textBox3.Text = "3.4";  
  376.                 textBox11.Text = "B+";  
  377.             } else if (comboBox7.Text == "79.50 - 84.49") {  
  378.                 textBox3.Text = "3.7";  
  379.                 textBox11.Text = "A";  
  380.             } else if (comboBox7.Text == "84.50 - 100") {  
  381.                 textBox3.Text = "4.0";  
  382.                 textBox11.Text = "A+";  
  383.             } else if (comboBox7.Text == " ") {  
  384.                 textBox3.Text = "0";  
  385.                 textBox11.Text = "0";  
  386.             } else {  
  387.                 textBox3.Text = "0";  
  388.                 textBox11.Text = "0";  
  389.             }  
  390.             //////////////////////////////////////////////////////////////combobox7 end  
  391.             if (comboBox10.Text == "0.00 - 48.99") {  
  392.                 textBox4.Text = "0.0";  
  393.                 textBox12.Text = "F";  
  394.             } else if (comboBox10.Text == "49 - 54.49") {  
  395.                 textBox4.Text = "1.0";  
  396.                 textBox12.Text = "D";  
  397.             } else if (comboBox10.Text == "54.50 - 59.49") {  
  398.                 textBox4.Text = "1.5";  
  399.                 textBox12.Text = "C";  
  400.             } else if (comboBox10.Text == "59.50 - 64.49") {  
  401.                 textBox4.Text = "2.0";  
  402.                 textBox12.Text = "C+";  
  403.             } else if (comboBox10.Text == "64.50 - 69.49") {  
  404.                 textBox4.Text = "2.5";  
  405.                 textBox12.Text = "B-";  
  406.             } else if (comboBox10.Text == "69.50 - 74.49") {  
  407.                 textBox4.Text = "3.0";  
  408.                 textBox12.Text = "B";  
  409.             } else if (comboBox10.Text == "74.50 - 79.49") {  
  410.                 textBox4.Text = "3.4";  
  411.                 textBox12.Text = "B+";  
  412.             } else if (comboBox10.Text == "79.50 - 84.49") {  
  413.                 textBox4.Text = "3.7";  
  414.                 textBox12.Text = "A";  
  415.             } else if (comboBox10.Text == "84.50 - 100") {  
  416.                 textBox4.Text = "4.0";  
  417.                 textBox12.Text = "A+";  
  418.             } else if (comboBox10.Text == " ") {  
  419.                 textBox4.Text = "0";  
  420.                 textBox12.Text = "0";  
  421.             } else {  
  422.                 textBox4.Text = "0";  
  423.                 textBox12.Text = "0";  
  424.             }  
  425.             ////////////////////////////////////////////////////////////////////combobox10 end  
  426.             if (comboBox13.Text == "0.00 - 48.99") {  
  427.                 textBox5.Text = "0.0";  
  428.                 textBox13.Text = "F";  
  429.             } else if (comboBox13.Text == "49 - 54.49") {  
  430.                 textBox5.Text = "1.0";  
  431.                 textBox13.Text = "D";  
  432.             } else if (comboBox13.Text == "54.50 - 59.49") {  
  433.                 textBox5.Text = "1.5";  
  434.                 textBox13.Text = "C";  
  435.             } else if (comboBox13.Text == "59.50 - 64.49") {  
  436.                 textBox5.Text = "2.0";  
  437.                 textBox13.Text = "C+";  
  438.             } else if (comboBox13.Text == "64.50 - 69.49") {  
  439.                 textBox5.Text = "2.5";  
  440.                 textBox13.Text = "B-";  
  441.             } else if (comboBox13.Text == "69.50 - 74.49") {  
  442.                 textBox5.Text = "3.0";  
  443.                 textBox13.Text = "B";  
  444.             } else if (comboBox13.Text == "74.50 - 79.49") {  
  445.                 textBox5.Text = "3.4";  
  446.                 textBox13.Text = "B+";  
  447.             } else if (comboBox13.Text == "79.50 - 84.49") {  
  448.                 textBox5.Text = "3.7";  
  449.                 textBox13.Text = "A";  
  450.             } else if (comboBox13.Text == "84.50 - 100") {  
  451.                 textBox5.Text = "4.0";  
  452.                 textBox13.Text = "A+";  
  453.             } else if (comboBox13.Text == " ") {  
  454.                 textBox5.Text = "0";  
  455.                 textBox13.Text = "0";  
  456.             } else {  
  457.                 textBox5.Text = "0";  
  458.                 textBox13.Text = "0";  
  459.             }  
  460.             ////////////////////////////////////////////////////////combobox13 end  
  461.             if (comboBox17.Text == "0.00 - 48.99") {  
  462.                 textBox6.Text = "0.0";  
  463.                 textBox14.Text = "F";  
  464.             } else if (comboBox17.Text == "49 - 54.49") {  
  465.                 textBox6.Text = "1.0";  
  466.                 textBox14.Text = "D";  
  467.             } else if (comboBox17.Text == "54.50 - 59.49") {  
  468.                 textBox6.Text = "1.5";  
  469.                 textBox14.Text = "C";  
  470.             } else if (comboBox17.Text == "59.50 - 64.49") {  
  471.                 textBox6.Text = "2.0";  
  472.                 textBox14.Text = "C+";  
  473.             } else if (comboBox17.Text == "64.50 - 69.49") {  
  474.                 textBox6.Text = "2.5";  
  475.                 textBox14.Text = "B-";  
  476.             } else if (comboBox17.Text == "69.50 - 74.49") {  
  477.                 textBox6.Text = "3.0";  
  478.                 textBox14.Text = "B";  
  479.             } else if (comboBox17.Text == "74.50 - 79.49") {  
  480.                 textBox6.Text = "3.4";  
  481.                 textBox14.Text = "B+";  
  482.             } else if (comboBox17.Text == "79.50 - 84.49") {  
  483.                 textBox6.Text = "3.7";  
  484.                 textBox14.Text = "A";  
  485.             } else if (comboBox17.Text == "84.50 - 100") {  
  486.                 textBox6.Text = "4.0";  
  487.                 textBox14.Text = "A+";  
  488.             } else if (comboBox17.Text == " ") {  
  489.                 textBox6.Text = "0";  
  490.                 textBox14.Text = "0";  
  491.             } else {  
  492.                 textBox6.Text = "0";  
  493.                 textBox16.Text = "0";  
  494.             }  
  495.             //////////////////////////////////////////////////combobox17 end  
  496.             if (comboBox19.Text == "0.00 - 48.99") {  
  497.                 textBox7.Text = "0.0";  
  498.                 textBox15.Text = "F";  
  499.             } else if (comboBox19.Text == "49 - 54.49") {  
  500.                 textBox7.Text = "1.0";  
  501.                 textBox15.Text = "D";  
  502.             } else if (comboBox19.Text == "54.50 - 59.49") {  
  503.                 textBox7.Text = "1.5";  
  504.                 textBox15.Text = "C";  
  505.             } else if (comboBox19.Text == "59.50 - 64.49") {  
  506.                 textBox7.Text = "2.0";  
  507.                 textBox15.Text = "C+";  
  508.             } else if (comboBox19.Text == "64.50 - 69.49") {  
  509.                 textBox7.Text = "2.5";  
  510.                 textBox15.Text = "B-";  
  511.             } else if (comboBox19.Text == "69.50 - 74.49") {  
  512.                 textBox7.Text = "3.0";  
  513.                 textBox15.Text = "B";  
  514.             } else if (comboBox19.Text == "74.50 - 79.49") {  
  515.                 textBox7.Text = "3.4";  
  516.                 textBox15.Text = "B+";  
  517.             } else if (comboBox19.Text == "79.50 - 84.49") {  
  518.                 textBox7.Text = "3.7";  
  519.                 textBox15.Text = "A";  
  520.             } else if (comboBox19.Text == "84.50 - 100") {  
  521.                 textBox7.Text = "4.0";  
  522.                 textBox15.Text = "A+";  
  523.             } else if (comboBox19.Text == " ") {  
  524.                 textBox7.Text = "0";  
  525.                 textBox15.Text = "0";  
  526.             } else {  
  527.                 textBox7.Text = "0";  
  528.                 textBox15.Text = "0";  
  529.             }  
  530.             ////////////////////////////////////////////////////combobox19 end  
  531.             if (comboBox24.Text == "0.00 - 48.99") {  
  532.                 textBox8.Text = "0.0";  
  533.                 textBox16.Text = "F";  
  534.             } else if (comboBox24.Text == "49 - 54.49") {  
  535.                 textBox8.Text = "1.0";  
  536.                 textBox16.Text = "D";  
  537.             } else if (comboBox24.Text == "54.50 - 59.49") {  
  538.                 textBox8.Text = "1.5";  
  539.                 textBox16.Text = "C";  
  540.             } else if (comboBox24.Text == "59.50 - 64.49") {  
  541.                 textBox8.Text = "2.0";  
  542.                 textBox16.Text = "C+";  
  543.             } else if (comboBox24.Text == "64.50 - 69.49") {  
  544.                 textBox8.Text = "2.5";  
  545.                 textBox16.Text = "B-";  
  546.             } else if (comboBox24.Text == "69.50 - 74.49") {  
  547.                 textBox8.Text = "3.0";  
  548.                 textBox16.Text = "B";  
  549.             } else if (comboBox24.Text == "74.50 - 79.49") {  
  550.                 textBox8.Text = "3.4";  
  551.                 textBox16.Text = "B+";  
  552.             } else if (comboBox24.Text == "79.50 - 84.49") {  
  553.                 textBox8.Text = "3.7";  
  554.                 textBox16.Text = "A";  
  555.             } else if (comboBox24.Text == "84.50 - 100") {  
  556.                 textBox8.Text = "4.0";  
  557.                 textBox16.Text = "A+";  
  558.             } else if (comboBox24.Text == " ") {  
  559.                 textBox8.Text = "0";  
  560.                 textBox16.Text = "0";  
  561.             } else {  
  562.                 textBox8.Text = "0";  
  563.                 textBox16.Text = "0";  
  564.             }  
  565.             //////////////////////////////////////////////////combobox24 end  
  566.   
  567.             //////////////////////////////////////////////////////////////////////  
  568.   
  569.             ///////////////////////////////////////////////////////////////////////////////////////  
  570.   
  571.             ////////////////////////////////////////////////////////////////////////////////////  
  572.   
  573.   
  574.   
  575.             ///////////////////////////////////////////////////////////////////////////////////  
  576.   
  577.             if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked && checkBox6.Checked && checkBox7.Checked && checkBox8.Checked) {  
  578.                 //////////////////////////////////////////////////////////////////////////////////  
  579.   
  580.                 a1 = float.Parse(comboBox2.Text);  
  581.                 b1 = float.Parse(textBox1.Text);  
  582.                 s1 = a1 * b1;  
  583.   
  584.                 /////////////////////////////////////subject 1  
  585.                 a2 = float.Parse(comboBox5.Text);  
  586.                 b2 = float.Parse(textBox2.Text);  
  587.                 s2 = a2 * b2;  
  588.                 /////////////////////////////////////////////////subject 2  
  589.                 a3 = float.Parse(comboBox8.Text);  
  590.                 b3 = float.Parse(textBox3.Text);  
  591.                 s3 = a3 * b3;  
  592.                 //////////////////////////////////////subject 3  
  593.                 a4 = float.Parse(comboBox11.Text);  
  594.                 b4 = float.Parse(textBox4.Text);  
  595.                 s4 = a4 * b4;  
  596.                 //////////////////////////////////////////subject 4  
  597.                 a5 = float.Parse(comboBox14.Text);  
  598.                 b5 = float.Parse(textBox5.Text);  
  599.                 s5 = a5 * b5;  
  600.                 ////////////////////////////////////////subject 5  
  601.                 a6 = float.Parse(comboBox16.Text);  
  602.                 b6 = float.Parse(textBox6.Text);  
  603.                 s6 = a6 * b6;  
  604.                 ///////////////////////////////////////subject 6  
  605.                 a7 = float.Parse(comboBox20.Text);  
  606.                 b7 = float.Parse(textBox7.Text);  
  607.                 s7 = a7 * b7;  
  608.                 ////////////////////////////////////////subject 7  
  609.                 a8 = float.Parse(comboBox22.Text);  
  610.                 b8 = float.Parse(textBox8.Text);  
  611.                 s8 = a8 * b8;  
  612.                 total = s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8;  
  613.                 total_crdits = a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8;  
  614.                 gpa = total / total_crdits;  
  615.                 textBox17.Text = gpa.ToString();  
  616.             }  
  617.             /////////////////////////////////////////////////////////////////////////////subject 8  
  618.             else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked && checkBox6.Checked && checkBox7.Checked) {  
  619.                 a1 = float.Parse(comboBox2.Text);  
  620.                 b1 = float.Parse(textBox1.Text);  
  621.                 s1 = a1 * b1;  
  622.                 ////////////////////////  
  623.                 a2 = float.Parse(comboBox5.Text);  
  624.                 b2 = float.Parse(textBox2.Text);  
  625.                 s2 = a2 * b2;  
  626.                 ////////////////////////  
  627.                 a3 = float.Parse(comboBox8.Text);  
  628.                 b3 = float.Parse(textBox3.Text);  
  629.                 s3 = a3 * b3;  
  630.                 ////////////////////////////  
  631.                 a4 = float.Parse(comboBox11.Text);  
  632.                 b4 = float.Parse(textBox4.Text);  
  633.                 s4 = a4 * b4;  
  634.                 /////////////////////////////  
  635.                 a5 = float.Parse(comboBox14.Text);  
  636.                 b5 = float.Parse(textBox5.Text);  
  637.                 s5 = a5 * b5;  
  638.                 ///////////////////////////////  
  639.                 a6 = float.Parse(comboBox16.Text);  
  640.                 b6 = float.Parse(textBox6.Text);  
  641.                 s6 = a6 * b6;  
  642.                 ///////////////////////////////  
  643.                 a7 = float.Parse(comboBox20.Text);  
  644.                 b7 = float.Parse(textBox7.Text);  
  645.                 s7 = a7 * b7;  
  646.                 ///////////////////////////////  
  647.                 total = s1 + s2 + s3 + s4 + s5 + s6 + s7;  
  648.                 total_crdits = a1 + a2 + a3 + a4 + a5 + a6 + a7;  
  649.                 gpa = total / total_crdits;  
  650.   
  651.                 textBox17.Text = gpa.ToString();  
  652.   
  653.             }  
  654.             ///////////////////////////////////////////////////////////////////////////////////  
  655.             else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked && checkBox6.Checked) {  
  656.                 a1 = float.Parse(comboBox2.Text);  
  657.                 b1 = float.Parse(textBox1.Text);  
  658.                 s1 = a1 * b1;  
  659.                 ////////////////////////  
  660.                 a2 = float.Parse(comboBox5.Text);  
  661.                 b2 = float.Parse(textBox2.Text);  
  662.                 s2 = a2 * b2;  
  663.                 ////////////////////////  
  664.                 a3 = float.Parse(comboBox8.Text);  
  665.                 b3 = float.Parse(textBox3.Text);  
  666.                 s3 = a3 * b3;  
  667.                 ////////////////////////////  
  668.                 a4 = float.Parse(comboBox11.Text);  
  669.                 b4 = float.Parse(textBox4.Text);  
  670.                 s4 = a4 * b4;  
  671.                 /////////////////////////////  
  672.                 a5 = float.Parse(comboBox14.Text);  
  673.                 b5 = float.Parse(textBox5.Text);  
  674.                 s5 = a5 * b5;  
  675.                 ///////////////////////////////  
  676.                 a6 = float.Parse(comboBox16.Text);  
  677.                 b6 = float.Parse(textBox6.Text);  
  678.                 s6 = a6 * b6;  
  679.                 ///////////////////////////////  
  680.                 total = s1 + s2 + s3 + s4 + s5 + s6;  
  681.                 total_crdits = a1 + a2 + a3 + a4 + a5 + a6;  
  682.                 gpa = total / total_crdits;  
  683.   
  684.                 textBox17.Text = gpa.ToString();  
  685.   
  686.             }  
  687.             ///////////////////////////////////////////////////////////////////////////////////////////////////////////////  
  688.             else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked && checkBox5.Checked) {  
  689.                 a1 = float.Parse(comboBox2.Text);  
  690.                 b1 = float.Parse(textBox1.Text);  
  691.                 s1 = a1 * b1;  
  692.                 ////////////////////////  
  693.                 a2 = float.Parse(comboBox5.Text);  
  694.                 b2 = float.Parse(textBox2.Text);  
  695.                 s2 = a2 * b2;  
  696.                 ////////////////////////  
  697.                 a3 = float.Parse(comboBox8.Text);  
  698.                 b3 = float.Parse(textBox3.Text);  
  699.                 s3 = a3 * b3;  
  700.                 ////////////////////////////  
  701.                 a4 = float.Parse(comboBox11.Text);  
  702.                 b4 = float.Parse(textBox4.Text);  
  703.                 s4 = a4 * b4;  
  704.                 /////////////////////////////  
  705.                 a5 = float.Parse(comboBox14.Text);  
  706.                 b5 = float.Parse(textBox5.Text);  
  707.                 s5 = a5 * b5;  
  708.                 ///////////////////////////////  
  709.                 total = s1 + s2 + s3 + s4 + s5;  
  710.                 total_crdits = a1 + a2 + a3 + a4 + a5;  
  711.                 gpa = total / total_crdits;  
  712.   
  713.                 textBox17.Text = gpa.ToString();  
  714.   
  715.             }  
  716.             /////////////////////////////////////////////////////////////////////////////////  
  717.   
  718.             else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked && checkBox4.Checked) {  
  719.                 a1 = float.Parse(comboBox2.Text);  
  720.                 b1 = float.Parse(textBox1.Text);  
  721.                 s1 = a1 * b1;  
  722.                 ////////////////////////  
  723.                 a2 = float.Parse(comboBox5.Text);  
  724.                 b2 = float.Parse(textBox2.Text);  
  725.                 s2 = a2 * b2;  
  726.                 ////////////////////////  
  727.                 a3 = float.Parse(comboBox8.Text);  
  728.                 b3 = float.Parse(textBox3.Text);  
  729.                 s3 = a3 * b3;  
  730.                 ////////////////////////////  
  731.                 a4 = float.Parse(comboBox11.Text);  
  732.                 b4 = float.Parse(textBox4.Text);  
  733.                 s4 = a4 * b4;  
  734.                 /////////////////////////////  
  735.   
  736.                 total = s1 + s2 + s3 + s4;  
  737.                 total_crdits = a1 + a2 + a3 + a4;  
  738.                 gpa = total / total_crdits;  
  739.   
  740.                 textBox17.Text = gpa.ToString();  
  741.   
  742.             }  
  743.             /////////////////////////////////////////////////////////////////////////////////////  
  744.   
  745.             else if (checkBox1.Checked && checkBox2.Checked && checkBox3.Checked) {  
  746.                 a1 = float.Parse(comboBox2.Text);  
  747.                 b1 = float.Parse(textBox1.Text);  
  748.                 s1 = a1 * b1;  
  749.                 ////////////////////////  
  750.                 a2 = float.Parse(comboBox5.Text);  
  751.                 b2 = float.Parse(textBox2.Text);  
  752.                 s2 = a2 * b2;  
  753.                 ////////////////////////  
  754.                 a3 = float.Parse(comboBox8.Text);  
  755.                 b3 = float.Parse(textBox3.Text);  
  756.                 s3 = a3 * b3;  
  757.                 ////////////////////////////  
  758.                 total = s1 + s2 + s3;  
  759.                 total_crdits = a1 + a2 + a3;  
  760.                 gpa = total / total_crdits;  
  761.   
  762.                 textBox17.Text = gpa.ToString();  
  763.             }  
  764.             /////////////////////////////////////////////////////////////////////////////////  
  765.             else if (checkBox1.Checked && checkBox2.Checked) {  
  766.                 a1 = float.Parse(comboBox2.Text);  
  767.                 b1 = float.Parse(textBox1.Text);  
  768.                 s1 = a1 * b1;  
  769.                 ////////////////////////  
  770.                 a2 = float.Parse(comboBox5.Text);  
  771.                 b2 = float.Parse(textBox2.Text);  
  772.                 s2 = a2 * b2;  
  773.                 //////////////////////  
  774.                 total = s1 + s2;  
  775.                 total_crdits = a1 + a2;  
  776.                 gpa = total / total_crdits;  
  777.   
  778.                 textBox17.Text = gpa.ToString();  
  779.             }  
  780.             ////////////////////////////////////////////////////////////////////////////  
  781.             ///////////////////////////////////////////////////////////////////////////////////////////////  
  782.             else if (checkBox1.Checked) {  
  783.                 a1 = float.Parse(comboBox2.Text);  
  784.                 b1 = float.Parse(textBox1.Text);  
  785.                 s1 = a1 * b1;  
  786.                 total = s1;  
  787.                 total_crdits = a1;  
  788.                 gpa = total / total_crdits;  
  789.   
  790.                 textBox17.Text = gpa.ToString();  
  791.   
  792.             }  
  793.             ///////////////////////////////////////////////////////////////////////////////////////////////  
  794.   
  795.   
  796.   
  797.   
  798.             else MessageBox.Show("Plz! Select the subjects.");  
  799.         }  
  800.   
  801.         private void comboBox5_SelectedIndexChanged(object sender, EventArgs e) {  
  802.   
  803.         }  
  804.         private void check1() {  
  805.             comboBox1.Enabled = checkBox1.Checked;  
  806.             comboBox2.Enabled = checkBox1.Checked;  
  807.             textBox1.Enabled = checkBox1.Checked;  
  808.             textBox9.Enabled = checkBox1.Checked;  
  809.         }  
  810.         private void check2() {  
  811.             comboBox4.Enabled = checkBox2.Checked;  
  812.             comboBox5.Enabled = checkBox2.Checked;  
  813.             textBox2.Enabled = checkBox2.Checked;  
  814.             textBox10.Enabled = checkBox2.Checked;  
  815.         }  
  816.         private void check3() {  
  817.             comboBox7.Enabled = checkBox3.Checked;  
  818.             comboBox8.Enabled = checkBox3.Checked;  
  819.             textBox3.Enabled = checkBox3.Checked;  
  820.             textBox11.Enabled = checkBox3.Checked;  
  821.         }  
  822.         private void check4() {  
  823.             comboBox10.Enabled = checkBox4.Checked;  
  824.             comboBox11.Enabled = checkBox4.Checked;  
  825.             textBox4.Enabled = checkBox4.Checked;  
  826.             textBox12.Enabled = checkBox4.Checked;  
  827.         }  
  828.         private void check5() {  
  829.             comboBox13.Enabled = checkBox5.Checked;  
  830.             comboBox14.Enabled = checkBox5.Checked;  
  831.             textBox5.Enabled = checkBox5.Checked;  
  832.             textBox13.Enabled = checkBox5.Checked;  
  833.         }  
  834.         private void check6() {  
  835.             comboBox17.Enabled = checkBox6.Checked;  
  836.             comboBox16.Enabled = checkBox6.Checked;  
  837.             textBox6.Enabled = checkBox6.Checked;  
  838.             textBox14.Enabled = checkBox6.Checked;  
  839.         }  
  840.         private void check7() {  
  841.             comboBox19.Enabled = checkBox7.Checked;  
  842.             comboBox20.Enabled = checkBox7.Checked;  
  843.             textBox7.Enabled = checkBox7.Checked;  
  844.             textBox15.Enabled = checkBox7.Checked;  
  845.         }  
  846.         private void check8() {  
  847.             comboBox24.Enabled = checkBox8.Checked;  
  848.             comboBox22.Enabled = checkBox8.Checked;  
  849.             textBox8.Enabled = checkBox8.Checked;  
  850.             textBox16.Enabled = checkBox8.Checked;  
  851.         }  
  852.   
  853.         private void checkBox1_CheckedChanged(object sender, EventArgs e) {  
  854.             check1();  
  855.             check2();  
  856.             check3();  
  857.             check4();  
  858.             check5();  
  859.             check6();  
  860.             check7();  
  861.             check8();  
  862.         }  
  863.   
  864.         private void checkBox2_CheckedChanged(object sender, EventArgs e) {  
  865.             check2();  
  866.         }  
  867.   
  868.         private void checkBox3_CheckedChanged(object sender, EventArgs e) {  
  869.             check3();  
  870.         }  
  871.   
  872.         private void checkBox4_CheckedChanged(object sender, EventArgs e) {  
  873.             check4();  
  874.         }  
  875.   
  876.         private void checkBox5_CheckedChanged(object sender, EventArgs e) {  
  877.             check5();  
  878.         }  
  879.   
  880.         private void checkBox6_CheckedChanged(object sender, EventArgs e) {  
  881.             check6();  
  882.         }  
  883.   
  884.         private void checkBox7_CheckedChanged(object sender, EventArgs e) {  
  885.             check7();  
  886.         }  
  887.   
  888.         private void checkBox8_CheckedChanged(object sender, EventArgs e) {  
  889.             check8();  
  890.         }  
  891.   
  892.   
  893.   
  894.   
  895.         private void textBox17_TextChanged(object sender, EventArgs e) {  
  896.   
  897.         }  
  898.   
  899.         private void comboBox11_SelectedIndexChanged(object sender, EventArgs e) {  
  900.   
  901.         }  
  902.   
  903.   
  904.     }  
  905. }