IT430 Assignment 2 Solution and Discussion


  • Cyberian's Gold

    @SQA-Master
    please join chat room for solution code

    Chat Room


  • Cyberian's

    Solution:

    <html>
      <head>
        <title>Grade Book Calculator</title>
    	<script>
    	  
     
    
    
    function Gradecal()
     {		
           
    	    
     if(window.document.frmStuGradeCal.Seng.value == "")
                {	
                 window.confirm("English Marks are missing");
                }	
    
    	else if(window.document.frmStuGradeCal.Smath.value == "")
                {	
                 window.confirm("Math Marks are missing");
                }	
    
        else if(window.document.frmStuGradeCal.Scom.value == "")
                {	
                 window.confirm("Computer Marks are missing");
                }	
    
         
    
    		if(window.document.frmStuGradeCal.Tmarks.value >= 85)
                {	
                 window.confirm("Your Grade is A+");
                }	
    
    else if(window.document.frmStuGradeCal.Tmarks.value == 84 || window.document.frmStuGradeCal.Tmarks.value  >= 74)
                {	
                 window.confirm("Your Grade is A");
                }	
    else if(window.document.frmStuGradeCal.Tmarks.value == 73 || window.document.frmStuGradeCal.Tmarks.value  >= 66)
                {	
                 window.confirm("Your Grade is B");
                }	
    
    else if(window.document.frmStuGradeCal.Tmarks.value == 65 || window.document.frmStuGradeCal.Tmarks.value  >= 51)
                {	
                 window.confirm("Your Grade is C");
                }	
    else if(window.document.frmStuGradeCal.Tmarks.value == 50 || window.document.frmStuGradeCal.Tmarks.value  >= 40)
                {	
                 window.confirm("Your Grade is D");
                }	
    
    
    else if (window.document.frmStuGradeCal.Tmarks.value < 40)
                {	
                 window.confirm("You are Fail");
                }	
    
    
             
          
    
    				  
       }  
    
    
    
    function focusOut() 
    {
    
    
    
    document.getElementById("yes8").value= (parseFloat(frmStuGradeCal.yes5.value) +  parseFloat(frmStuGradeCal.yes6.value)+parseFloat(frmStuGradeCal.yes7.value))/3;
    
    
    	
    
    }
    
    function reset() 
    {
         	document.getElementById("yes").value = "";
         	document.getElementById("yes1").value = "";
    	document.getElementById("yes2").value = "";
         	document.getElementById("yes3").value = "";
    	document.getElementById("yes4").value = "";
         	document.getElementById("yes5").value = "";
    	document.getElementById("yes6").value = "";
    	document.getElementById("yes7").value = "";
            document.getElementById("yes8").value = "";
    }
    
    	  
    	</script>
      </head>
        <body>
         <h2 align= "Center"style="background-color:DodgerBlue;"> Grade  Book Calculator</h2>
         <h3 align= "Center"style="background-color:DodgerBlue;"> Welcome to online Grade Book  Calculator</h3>
           <form name="frmStuGradeCal" align="center">
             <table align="center">
               <tr><td>Student ID: </td><td><input type ="text" id="yes" Name="StuId" value = BC123456789 ><td  bgcolor="#FF0000">*Write your own VUID </td></td></tr><br>
               <tr><td>Name: </td><td><input type ="text" id="yes1" Name="StuName" value = "Aamir Latif" ></td></tr><br>
               <tr><td>Father Name:</td><td><input type ="text" id="yes2" Name="FatherName" value = "Abdul Latif" ></td></tr><br>
                                 
    			
    <tr><td>CNIC:</td><td><input type ="text" id="yes4" maxlength="15" Name="StuCnic" value = "33100-1100321-5"> <td  bgcolor="#FF0000">*e.g 33100-1100321-5</td> </td></tr><br>
    <tr><td>English*:</td><td><input type ="number" id="yes5" Name="Seng" onfocusout="focusOut()"></td></tr><br>
    <tr><td>Math*:</td><td><input type ="number" id="yes6" Name="Smath" onfocusout="focusOut()"></td></tr><br>
    <tr><td>Camputer*:</td><td><input type ="number" id="yes7" Name="Scom" onfocusout="focusOut()"></td></tr><br>
    <tr><td>Average Marks:</td><td><input type ="number" id="yes8" Name="Tmarks" disabled></td></tr><br>
    
                     
               </table>
    		   
             <input type="button" name="btncalculator" value=" Grade Book" onclick= "Gradecal()">
    		         
    
    </tr>
    
    <tr>  </tr>
    
    <tr >
    
    <td >  
    
    
    <input type="button" value="Reset" onClick="this.form.reset()" >
    </td>
    
    </tr>
    
    <tr>
    <td  colspan = 2>
    You can press reset button for another Grade Book Calculation</td>
    </tr>
    
    
    
           </form>
        </body>
    
    </html>
    
    

  • Cyberian's

    Solution:

    <html>
      <head>
        <title>Grade Book Calculator</title>
    	<script>
    	  
     
    
    
    function Gradecal()
     {		
           
    	    
     if(window.document.frmStuGradeCal.Seng.value == "")
                {	
                 window.confirm("English Marks are missing");
                }	
    
    	else if(window.document.frmStuGradeCal.Smath.value == "")
                {	
                 window.confirm("Math Marks are missing");
                }	
    
        else if(window.document.frmStuGradeCal.Scom.value == "")
                {	
                 window.confirm("Computer Marks are missing");
                }	
    
         
    
    		if(window.document.frmStuGradeCal.Tmarks.value >= 85)
                {	
                 window.confirm("Your Grade is A+");
                }	
    
    else if(window.document.frmStuGradeCal.Tmarks.value == 84 || window.document.frmStuGradeCal.Tmarks.value  >= 74)
                {	
                 window.confirm("Your Grade is A");
                }	
    else if(window.document.frmStuGradeCal.Tmarks.value == 73 || window.document.frmStuGradeCal.Tmarks.value  >= 66)
                {	
                 window.confirm("Your Grade is B");
                }	
    
    else if(window.document.frmStuGradeCal.Tmarks.value == 65 || window.document.frmStuGradeCal.Tmarks.value  >= 51)
                {	
                 window.confirm("Your Grade is C");
                }	
    else if(window.document.frmStuGradeCal.Tmarks.value == 50 || window.document.frmStuGradeCal.Tmarks.value  >= 40)
                {	
                 window.confirm("Your Grade is D");
                }	
    
    
    else if (window.document.frmStuGradeCal.Tmarks.value < 40)
                {	
                 window.confirm("You are Fail");
                }	
    
    
             
          
    
    				  
       }  
    
    
    
    function focusOut() 
    {
    
    
    
    document.getElementById("yes8").value= (parseFloat(frmStuGradeCal.yes5.value) +  parseFloat(frmStuGradeCal.yes6.value)+parseFloat(frmStuGradeCal.yes7.value))/3;
    
    
    	
    
    }
    
    function reset() 
    {
         	document.getElementById("yes").value = "";
         	document.getElementById("yes1").value = "";
    	document.getElementById("yes2").value = "";
         	document.getElementById("yes3").value = "";
    	document.getElementById("yes4").value = "";
         	document.getElementById("yes5").value = "";
    	document.getElementById("yes6").value = "";
    	document.getElementById("yes7").value = "";
            document.getElementById("yes8").value = "";
    }
    
    	  
    	</script>
      </head>
        <body>
         <h2 align= "Center"style="background-color:DodgerBlue;"> Grade  Book Calculator</h2>
         <h3 align= "Center"style="background-color:DodgerBlue;"> Welcome to online Grade Book  Calculator</h3>
           <form name="frmStuGradeCal" align="center">
             <table align="center">
               <tr><td>Student ID: </td><td><input type ="text" id="yes" Name="StuId" value = BC123456789 ><td  bgcolor="#FF0000">*Write your own VUID </td></td></tr><br>
               <tr><td>Name: </td><td><input type ="text" id="yes1" Name="StuName" value = "Aamir Latif" ></td></tr><br>
               <tr><td>Father Name:</td><td><input type ="text" id="yes2" Name="FatherName" value = "Abdul Latif" ></td></tr><br>
                                 
    			
    <tr><td>CNIC:</td><td><input type ="text" id="yes4" maxlength="15" Name="StuCnic" value = "33100-1100321-5"> <td  bgcolor="#FF0000">*e.g 33100-1100321-5</td> </td></tr><br>
    <tr><td>English*:</td><td><input type ="number" id="yes5" Name="Seng" onfocusout="focusOut()"></td></tr><br>
    <tr><td>Math*:</td><td><input type ="number" id="yes6" Name="Smath" onfocusout="focusOut()"></td></tr><br>
    <tr><td>Camputer*:</td><td><input type ="number" id="yes7" Name="Scom" onfocusout="focusOut()"></td></tr><br>
    <tr><td>Average Marks:</td><td><input type ="number" id="yes8" Name="Tmarks" disabled></td></tr><br>
    
                     
               </table>
    		   
             <input type="button" name="btncalculator" value=" Grade Book" onclick= "Gradecal()">
    		         
    
    </tr>
    
    <tr>  </tr>
    
    <tr >
    
    <td >  
    
    
    <input type="button" value="Reset" onClick="this.form.reset()" >
    </td>
    
    </tr>
    
    <tr>
    <td  colspan = 2>
    You can press reset button for another Grade Book Calculation</td>
    </tr>
    
    
    
           </form>
        </body>
    
    </html>
    
    

  • Cyberian's Gold


  • Cyberian's Gold

    Assignment Available only for Cyberian Chat Room! Members
    Please check Live Streaming


  • Cyberian's Gold

    26184f54-1ba8-46f1-b203-4c5fa341d6b0-image.png


  • Cyberian's Gold

    @SQA-Master
    Solution is crating team ASAP!


  • Cyberian's Gold

    Comping Soon Solution!

    f0237936-a8a7-4ebf-9d73-c359cd905c65-image.png



  • Please send solution of this Assignment



Quiz 100% Result Quiz 100% Result
| |