This Question Is Of Data Structure And Algorithms. Write The Code In Java According To The Given Problem In Pictures.Also Write The Cide On Eclipse.Provide The Screenshots Of Output Of Eclipse Code.

匿名用户 最后更新于 2021-11-29 17:10 计算机类Computing

This question is of Data Structure andAlgorithms.
Write the code in java according to the given problem inpictures.Also write the cide on eclipse.Provide the screenshots ofoutput of eclipse code.

BS-CS/SE Program CS-242 GIFT University Gujranwala In this assignment, you are required to complete the steps given below. Question 1: Implement the following hierarchy of classes given below. Person Name: String Age: int Id: int Constructors Setters Getters ToString A Student Semester int Department String Teacher Subject Speciality: String Salary: double Programmer Typing Speed (WPM): int Constructors Setters Getters ToString Constructors Setters Getters ToString Constructors Setters Getters ToString Question 2: Write two other classes SortByNameAscending and SortByNameDescending which implements the Comparator and implements its overridden method so that it sorts the array dent, array Teacher, array mer in both Descending and Ascending order by Name. 2/3 BS-CS/SE Program CS-242 GIFT University Guam Question 3: Now Write another class LoadAndSortData with the main method and do the following tasks. ► Create an array list of type ArrayList ► Create an array list of type ArrayList Create an array list of type ArrayList ► Create objects of Student, Teacher and Programmer class > Add each object into its respective ArrayList that you created above. > Sort all the ArrayLists (arrayStudent, array Teacher, array Programmer) in ascending order by the SortByNameAscending class and then print the list. Sort all the ArrayLists (array Student, arrayTeacher, array Programer) in descending order by the SortByNameDescending class and then print the list.

已邀请: