Ads

Pages

Tuesday, January 4, 2011

MGT101 Assignment Solution

Question # 1:

1-New provision:

Accounts receivable= Rs. 205000

-Bad Debts = Rs. 5000

------------------

= Rs. 2000000

------------------

New provision = Rs. 2000000 * 5 %

New provision = Rs. 10000

2- amount of Provision for doubtful debts to be appeared in Profit and

Loss Account:

Ali & Sons

Profit and Loss Account

For the year ended Dec 31, 2010

Narration

Rs.

Rs.

New provision for doubtful debts

10000

+ total Bad debts

( 8000+5000)

12000

22000

- Old provision for doubtful debts

6000

amount of Provision for doubtful debts

16000

8000+5000=13000 hai aap na 12000 lika hai

3-amount of Sundry debtors to be shown in Balance Sheet

Ali & Sons

Balance sheet

As on 31st December 2010

Assets

Rs.

Rs.

Current Assets:

Debtors

205000

-Bad debts

5000

-new provision

10000

190000

Question # 2

Debtors control account

Debit side

Credit side

Date

No.

Narrations

Dr. Rs.

Date

No.

Narrations

Dr. Rs.

1

Bal B/F

25000

4

Discount Allowed

2000

3

Credit Sales

50000

6

Receipts

35000

7

Bad debts

10000

8

Sales return

5000

Bal C/F

23000

Total

75000

Total

75000

CS403 Database Management Systems Assignment#3 Solution


Second Normal Form

Student ID

Name

Vu001

Faizan

Vu001

Faizan

Vu002

Zafar

Vu003

Ahmad

Vu003

Ahmad

Vu003

Ahmad

Vu004

Fahad

Vu004

Fahad




Specialization semester

Semester start date

Semester end date

Fall 2009

05-07-09

31-12-09

Spring 2010

05-02-10

30-06-10

Spring 2010

05-02-10

30-06-10

Fall 2009

05-07-09

31-12-09

Spring 2010

05-02-10

30-06-10

Fall 2010

05-07-10

31-12-10

Fall 2010

05-07-10

31-12-10

Spring 2011

05-02-11

30-06-11

Specialization

Specialization supervisor

SE

Prof. Majid

AI

Prof. Saeed

AI

Prof. Saeed

SE

Prof. Majid

Networks

Prof. Wajid

AI

Prof. Saeed

SE

Prof. Majid

AI

Prof. Saeed

Third Normal Form

Specialization

Specialization semester

Semester start date

Semester end date

SE

Fall 2009

05-07-09

31-12-09

AI

Spring 2010

05-02-10

30-06-10

AI

Spring 2010

05-02-10

30-06-10

SE

Fall 2009

05-07-09

31-12-09

Networks

Spring 2010

05-02-10

30-06-10

AI

Fall 2010

05-07-10

31-12-10

SE

Fall 2010

05-07-10

31-12-10

AI

Spring 2011

05-02-11

30-06-11

Monday, January 3, 2011

CS101 Assignment 03 Solution

VUsolutions

<>

<>

< language="JavaScript" type="text/javascript">

function alert_showmsg(msgs)

{

var whole_msg="";

var first_elmnt=null;

for(var m=0;m <>

{

if(null == first_elmnt)

{

first_elmnt = msgs[m]["input_element"];

}

whole_msg += msgs[m]["msg"] + "\n";

}

alert(whole_msg);

if(null != first_elmnt)

{

sfm_set_focus(first_elmnt);

}

}

function sfm_validator_enable_focus(enable)

{

document.set_focus_onerror = enable;

}

function set_addnl_vfunction(functionname)

{

this.formobj.addnlvalidation = functionname;

}

function sfm_set_focus(objInput)

{

if(document.set_focus_onerror)

{

objInput.focus();

}

}

function sfm_enable_show_msgs_together()

{

this.show_errors_together=true;

this.formobj.show_errors_together=true;

}

function clear_all_validations()

{

for(var itr=0;itr <>

{

this.formobj.elements[itr].validationset = null;

}

}

function form_submit_handler()

{

var bRet = true;

document.error_disp_handler.clear_msgs();

for(var itr=0;itr <>

{

if(this.elements[itr].validationset &&

!this.elements[itr].validationset.validate())

{

bRet = false;

}

if(!bRet && !this.show_errors_together)

{

break;

}

}

if(this.addnlvalidation)

{

str =" var ret = "+this.addnlvalidation+"()";

eval(str);

if(!ret)

{

bRet=false;

}

}

if(!bRet)

{

document.error_disp_handler.FinalShowMsg();

return false;

}

return true;

}

function Validator(frmname)

{

this.formobj=document.forms[frmname];

if(this.formobj.onsubmit)

{

this.formobj.old_onsubmit = this.formobj.onsubmit;

this.formobj.onsubmit=null;

}

else

{

this.formobj.old_onsubmit = null;

}

this.formobj._sfm_form_name=frmname;

this.formobj.onsubmit=form_submit_handler;

this.ValAddition = add_validation;

this.setAddnlValidationFunction=set_addnl_vfunction;

this.clearAllValidations = clear_all_validations;

this.disable_validations = false;//new

document.error_disp_handler = new sfm_ErrorDisplayHandler();

this.EnableOnPageErrorDisplay=validator_enable_OPED;

this.EnableOnPageErrorDisplaySingleBox=validator_enable_OPED_SB;

this.show_errors_together=true;

this.EnableMsgsTogether=sfm_enable_show_msgs_together;

document.set_focus_onerror=true;

this.EnableFocusOnError=sfm_validator_enable_focus;

}

function add_validation(itemname,descriptor,errstr)

{

var condition = null;

if(arguments.length > 3)

{

condition = arguments[3];

}

if(!this.formobj)

{

alert("Error: The form object is not set properly");

return;

}//if

var itemobj = this.formobj[itemname];

if(itemobj.length && isNaN(itemobj.selectedIndex) )

//for radio button; don't do for 'select' item

{

itemobj = itemobj[0];

}

if(!itemobj)

{

alert("Error: Couldnot get the input object named: "+itemname);

return;

}

if(!itemobj.validationset)

{

itemobj.validationset = new ValidationSet(itemobj,this.show_errors_together);

}

itemobj.validationset.add(descriptor,errstr,condition);

itemobj.validatorobj=this;

}

function validator_enable_OPED()

{

document.error_disp_handler.EnableOnPageDisplay(false);

}

function validator_enable_OPED_SB()

{

document.error_disp_handler.EnableOnPageDisplay(true);

}

function edh_clear_msgs()

{

this.msgdisplay.clearmsg(this.all_msgs);

this.all_msgs = new Array();

}

function edh_FinalShowMsg()

{

this.msgdisplay.showmsg(this.all_msgs);

}

function edh_EnableOnPageDisplay(single_box)

{

if(true == single_box)

{

this.msgdisplay = new SingleBoxErrorDisplay();

}

else

{

this.msgdisplay = new DivMsgDisplayer();

}

}

function edh_ShowMsg(msg,input_element)

{

var objmsg = new Array();

objmsg["input_element"] = input_element;

objmsg["msg"] = msg;

this.all_msgs.push(objmsg);

}

function AlertMsgDisplayer()

{

this.showmsg = alert_showmsg;

this.clearmsg=alert_clearmsg;

}

function sfm_ErrorDisplayHandler()

{

this.msgdisplay = new AlertMsgDisplayer();

this.EnableOnPageDisplay= edh_EnableOnPageDisplay;

this.ShowMsg=edh_ShowMsg;

this.FinalShowMsg=edh_FinalShowMsg;

this.all_msgs=new Array();

this.clear_msgs=edh_clear_msgs;

}

function alert_clearmsg(msgs)

{

}

function sfm_show_error_msg(msg,input_elmt)

{

document.error_disp_handler.ShowMsg(msg,input_elmt);

}

function SingleBoxErrorDisplay()

{

this.showmsg=sb_div_showmsg;

this.clearmsg=sb_div_clearmsg;

}

function sb_div_clearmsg(msgs)

{

var divname = form_error_div_name(msgs);

show_div_msg(divname,"");

}

function ValidationDesc(inputitem,desc,error,condition)

{

this.desc=desc;

this.error=error;

this.itemobj = inputitem;

this.condition = condition;

this.validate=vdesc_validate;

}

function vdesc_validate()

{

if(this.condition != null )

{

if(!eval(this.condition))

{

return true;

}

}

if(!validateInput(this.desc,this.itemobj,this.error))

{

this.itemobj.validatorobj.disable_validations=true;

sfm_set_focus(this.itemobj);

return false;

}

return true;

}

function ValidationSet(inputitem,msgs_together)

{

this.vSet=new Array();

this.add= add_validationdesc;

this.validate= vset_validate;

this.itemobj = inputitem;

this.msgs_together = msgs_together;

}

function add_validationdesc(desc,error,condition)

{

this.vSet[this.vSet.length]=

new ValidationDesc(this.itemobj,desc,error,condition);

}

function vset_validate()

{

var bRet = true;

for(var itr=0;itr

{

bRet = bRet && this.vSet[itr].validate();

if(!bRet && !this.msgs_together)

{

break;

}

}

return bRet;

}

function TestRequiredInput(objValue,strError)

{

var ret = true;

var val = objValue.value;

val = val.replace(/^\s+|\s+$/g,"");//trim

if(eval(val.length) == 0)

{

if(!strError || strError.length ==0)

{

strError = objValue.name + " : Required Field";

}//if

sfm_show_error_msg(strError,objValue);

ret=false;

}//if

return ret;

}

function TestMaxLen(objValue,strMaxLen,strError)

{

var ret = true;

if(eval(objValue.value.length) > eval(strMaxLen))

{

if(!strError || strError.length ==0)

{

strError = objValue.name + " : "+ strMaxLen +" characters maximum ";

}//if

sfm_show_error_msg(strError,objValue);

ret = false;

}//if

return ret;

}

function TestMinLen(objValue,strMinLen,strError)

{

var ret = true;

if(eval(objValue.value.length) < eval(strMinLen))

{

if(!strError || strError.length ==0)

{

strError = objValue.name + " : " + strMinLen + " characters minimum ";

}//if

sfm_show_error_msg(strError,objValue);

ret = false;

}//if

return ret;

}

function TestInputType(objValue,strRegExp,strError,strDefaultError)

{

var ret = true;

var charpos = objValue.value.search(strRegExp);

if(objValue.value.length > 0 && charpos >= 0)

{

objValue.style.background="lightblue";

if(!strError || strError.length ==0)

{

strError = strDefaultError;

}//if

sfm_show_error_msg(strError,objValue);

ret = false;

}//if

return ret;

}

function TestLessThan(objValue,strLessThan,strError)

{

var ret = true;

if(isNaN(objValue.value))

{

sfm_show_error_msg(objValue.name +": Should be a number ",objValue);

ret = false;

}//if

else

if(eval(objValue.value) >= eval(strLessThan))

{

if(!strError || strError.length ==0)

{

strError = objValue.name + " : value should be less than "+ strLessThan;

}//if

objValue.style.background="lightblue";

sfm_show_error_msg(strError,objValue);

ret = false;

}//if

return ret;

}

function TestGreaterThan(objValue,strGreaterThan,strError)

{

var ret = true;

if(isNaN(objValue.value))

{

sfm_show_error_msg(objValue.name+": Should be a number ",objValue);

ret = false;

}//if

else

if(eval(objValue.value) <= eval(strGreaterThan))

{

if(!strError || strError.length ==0)

{

strError = objValue.name + " : value should be greater than "+ strGreaterThan;

}//if

objValue.style.background="lightblue";

sfm_show_error_msg(strError,objValue);

ret = false;

}//if

return ret;

}

function CheckBtwValues(objValue,strGrtVal,strError)

{

var ret = true;

if(isNaN(objValue.value))

{

sfm_show_error_msg(objValue.name+": Should be a number ",objValue);

ret = false;

}//if

else

if(objValue.value == '')

{

strError = "Please enter a GPA number only.";

fldColor = "yello";

}//if

else

if(eval(objValue.value) >= 1 && eval(objValue.value) <>

{

strError = "FAIR - YOU HAVE GOT D GRADE.";

fldColor = "green";

}//if

else

if(eval(objValue.value) >= 2 && eval(objValue.value) <>

{

strError = "GOOD - YOU HAVE GOT C GRADE.";

fldColor = "green";

}//if

else

if(eval(objValue.value) >= 3 && eval(objValue.value) <>

{

strError = "VERY GOOD - YOU HAVE GOT B GRADE.";

fldColor = "green";

}//if

if(eval(objValue.value) == 4)

{

strError = "EXCELLENT - YOU HAVE GOT A GRADE.";

fldColor = "green";

}//if

objValue.style.background=fldColor;

sfm_show_error_msg(strError,objValue);

ret = false;

return ret;

}

function validateInput(strValidateStr,objValue,strError)

{

var ret = true;

var epos = strValidateStr.search("=");

var command = "";

var cmdvalue = "";

if(epos >= 0)

{

command = strValidateStr.substring(0,epos);

cmdvalue = strValidateStr.substr(epos+1);

}

else

{

command = strValidateStr;

}

switch(command)

{

case "req":

case "required":

{

ret = TestRequiredInput(objValue,strError)

break;

}//case required

case "maxlength":

case "maxlen":

{

ret = TestMaxLen(objValue,cmdvalue,strError)

break;

}//case maxlen

case "minlength":

case "minlen":

{

ret = TestMinLen(objValue,cmdvalue,strError)

break;

}//case minlen

case "dec":

case "decimal":

{

ret = TestInputType(objValue,"[^0-9\.]",strError,

"Enter numbers only");

break;

}

case "lt":

case "lessthan":

{

ret = TestLessThan(objValue,cmdvalue,strError);

break;

}

case "gt":

case "greaterthan":

{

ret = TestGreaterThan(objValue,cmdvalue,strError);

break;

}//case greaterthan

case "CheckGPA":

{

ret = CheckBtwValues(objValue,strError);

break;

}

}//switch

return ret;

}

<>

< align="center">YOUR STUDENT ID :: Assignment NUMBER

< action="http://www.vu.edu.pk" method="post" id="cs101frm">

< width="800" border="1" align="center">

<>

< width="116" height="50" align="center" bgcolor="#CCCCCC">GPA

< width="468" bgcolor="#CCCCCC">< name="GPA" type="text" id="GPA" size="75">

<>

< height="50" bgcolor="#CCCCCC">

< bgcolor="#CCCCCC">< type="submit" name="button" id="button" value="Find Grade">