You should design, implement and test a function to allow the user to sort all appointment records in appointmentArr based on one of the following attributes: date, start time, end time, subject,...

You should design, implement and test a function to allow the user to sort all appointment records in appointmentArr based on one of the following attributes: date, start time, end time, subject, venue, priority and display the sorted appointment records of Diary when an attribute is selected in the dropdown list associated with by "by" and the "Sort Appointment records" button is pressed. The sorting orders are specified as follows:  Date: from earlier date to later date;  Start time: following the order of time value of hours, ignore the date value.  End time: following the order of time value of hours, ignore the date value.  Subject: following the order of corresponding unicode values, e.g., from A to Z then a to z ;  Venue: following the order of corresponding unicode values, e.g., from A to Z then a to z ;  Priority: "Low", "Medium" to "High". You should use string handling techniques to extract the corresponding attribute values from the appointment records and sort the appointment records on the basis of these values. When sorting records based on Date, you should firstly restore the Date object of appointment records using the extracted Date and Stat Time values and then compare their time value (accessed via getTime()) for sorting. The bubble sort algorithm should be employed for the design of the function.
Oct 04, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here