Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question is of Data Structure.Write the code in java language.Do it according to given instructions. In this assignment, you are required to complete the

This question is of Data Structure.Write the code in java language.Do it according to given instructions.

image text in transcribed

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 Student Programmer Semesterint Department. String Teacher Subject Speciality: String Salary: double 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 arrayStudent, arrayTeacher, array Programmer in both Descending and Ascending order by Name. 2/3 BS-CS/SE Program CS-242 GIFT University 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 (array Student, arrayTeacher, 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

4. Describe the factors that influence self-disclosure

Answered: 1 week ago

Question

1. Explain key aspects of interpersonal relationships

Answered: 1 week ago