//DefineavariablecalledclassListwhichisassignedanemptyarray//(1mark)...

//DefineavariablecalledclassListwhichisassignedanemptyarray//(1mark)
/***Definethefollowingfunction(enrollStudent)whichtakesasparametersthefollowing:*firstName(string),lastName(string),age(number),currentMark(number)**Thisfunctionshouldcreateastudentobjectwiththeaboveproperties*andaddittoclassListarraythatisdefinedinLine1above*(5marks)*/constenrollStudent;
/***Definethefollowingfunction(numStudentEnrolled)*whichshouldreturnthenumberofstudentsintheclassListarray*(2marks)*/constnumStudentEnrolled;
/***DefineafunctioncalledgetClassAverage*Thisshouldreturntheaveragemarkoftheentireclass(classList)*usingthecurrentMarkpropertyofeachstudent*(5marks)*///getClassAveragefunctiongoeshere
/***DefineafunctioncalledstudentAboveClassAverage*Thisfunctionshouldacceptastudentobject*Ifthestudent'scurrentMarkisaboveclassaverage,thenitreturnstrue*Ifthestudent'scurrentMarkisbelowclassaverage,thenitreturnsfalse*Ifthestudent'scurrentMarkisequaltoclassaverage,thenitreturnsnull*(5marks)*///studentAboveClassAveragefunctiongoeshere
/***DefineafunctioncalledgetClassList*ThisfunctionshouldreturntheclassListarray*(1mark)*///getClassListfunctiongoeshere
///----------DONOTEDITBELOW--------///
constemptyClass=()=>{classList=[];}
export{enrollStudent,numStudentEnrolled,getClassAverage,studentAboveClassAverage,getClassList,emptyClass}
Mar 25, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here