Edupoint Writeup

harsh_jec Apr 24th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DebugSession:
  3. Following changes were made to the code to remove the existing bug:
  4. 1) Class object was not initialized correctly -
  5. TotalClass totalClass = new TotalClass();
  7. 2) The node from XML DOM wasn't accessed correctly -
  8. studentList = studentData.SelectNodes("//STUDNT");
  10. 3) The switch case does not consider "f" and "m" values.
  12. 4) In TotalClass.cs, variables "Males" and "Females" are initialized with -1. It should be initialized with 0.
  14. —————————————————————————————————————————————————-------------------------------------------------------------------
  16. Sorter:
  18. Form1.cs - contains the logic of file reading, name list sorting and writing inside method "btnRun_Click".
  19. Person.cs - contains two classes
  20.     Person - POJO containing the first name and last name of the person.
  21.     PersonNameComparer - Comparer used to sort the objects in the list based on the last name. If the last name is the same, then it sorts by the first name.
  22. Exception handling - used in Form1.cs (handles File not found exception)
  23. Assumption - The names with no last names would come first.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand