(C, 61, 46) (P, 17, 20) (H, 18, 30) (F, 26, 27) (E, 45, 52) (C, 50, 42) (D, 42, 43) (B, 32, 23) (R, 30, 30)
void f4(self) Sort in ascending order all Employees whose age is an even number, if the Employees are same age, then sort salary in descending order. The other elements are unchanged.Output in this case like that:
OUTPUT
(C, 60, 46) (P, 16, 20) (ΧΗ, 36, 51) (H, 18, 30) (F, 30, 27) (E, 45, 52) (C, 30, 42) (D, 42, 43) (B, 30, 23) (R, 30,30)
(P, 16, 20) (H, 18, 30) (C, 30, 42) (R, 30, 30) (F, 30, 27) (Ε, 45, 52) (Β, 30, 23) (XH, 36, 51) (D, 42, 43) (C, 60,46)
Question 2: (4 marks)
In this question you should complete some methods in BSTree.py files.
The class Employee with 3 data members: Name, Age and Salary is given and you do not need to edit it.The BSTree class is a binary search tree of Employee objects. The variable Age is the key of the tree. The following methods should be completed:
void f1(self, name, age, salary) - check if name start with = "Y" or age <0 or salary <=0 then do nathina sthanuice incest
Emalouse with Memoenom
and Colonesolone to the
Close
+ 100%
Zoom