CSD201_-_PE1_-_FA2024_2928.webp
O

CSD201_-_PE1_-_FA2024_2928.webp

Construct and manage a Binary Search Tree (BST) to store employee information based on the ID field, including employee data as follows:
ID
Name
Department
Seniority
104
Nam Nguyen
HR IT
5
102
Linh Phan
1
103
Minh Le
Finance
3
101
Ngoc Nguyen
IT
6
107
Huong Pham Tuan Tran
Finance
3
106
Finance
2
108
Hang Le
IT
4
105
Hung Nguyen
IT
5
1. Define the Employee class: (0.5 points)
Store the employee's information, including the following fields:
Employee ID (id - integer)
Employee Name (name - string)Department (department - string)
Seniority (seniority - integer)

2. Define the Node class: (0.5 points)
Each node contains an Employee object and necessary fields for tree operations.
3. Define the BST class:
3.1. The insert method to insert an employee into the BST based on the employee's ID. (1
point)
3.2. The inOrder method to traverse the BST using in-order traversal. (1 point)
3.3. The search method to search for an employee by their name. (1 point)
+ 100%
Zoom
Close
Chưa có bình luận nào.

Thông tin

Category
CSD201
Thêm bởi
Olivier2005
Ngày thêm
Lượt xem
1,945
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
CSD201_-_PE1_-_FA2024_2928.webp
File size
229.4 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom