usingSystem;usingSystem.Collections;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceReview cs{classProgram {structStudent { Public intnum; Public stringCode; Public stringName; Public decimalscore; } Static voidMain (string[] args) { //1. Loop to add student informationArrayList list =NewArrayList (); for(inti =1; I <4; i++) {Student s=NewStudent ();//instantiation ofConsole.Write ("Please enter section"+ i +"Student's School number:"); S.code=Console.ReadLine (); Console.Write ("Please enter section"+ i +"the name of a student:"); S.name=Console.ReadLine (); Console.Write ("Please enter section"+ i +"A student's achievement:"); S.score=Convert.todecimal (Console.ReadLine ()); S.num=i; List. ADD (s); Console.WriteLine ("==============================="); } Console.WriteLine ("-----------------------student data show--------------------------"); //2. Sorting for(inti =0; I < list. Count-1; i++) { for(intj = i +1; J < list. Count; J + +) {Student S1=(Student) list[i]; Student S2=(Student) list[j]; if(S1. Score <S2. Score) {Object ob=List[i]; List[i]=List[j]; LIST[J]=ob; } } } //3. Printing foreach(ObjectOinchlist) {Student SS=(Student) o; Console.WriteLine ("Section"+ Ss.num +"Student's School number:"+ SS. Code +", Name:"+ SS. Name +", Score:"+ SS. Score +". "); } console.readkey (); } }}
6.17 Review the bubble sort of student information based on student score