CSD201_-_FA_2024_-_Block_5_-_PE_3214.webp
Lisanna_chan

CSD201_-_FA_2024_-_Block_5_-_PE_3214.webp

K
10,9,8) (0,6,3) (E,8,5) (F,5,4) (1,4,9)
Kizspy mec,9,8) (D,6,3) (E,8,5) (F,5,4)
(1,4,9)
void f3() - Suppose the list is not empty. Remove the first node having color<6. Output i f3.txt must be the following:
C,8,6) (D,6,7) (E,9,2) (F,5,8) (G,9,7) (H,6,8) (1,7,3)(
(C,8,6) (D,6,7) (F,5,8) (G,9,7) (H,6,8)
(1,7,3)
void f4() - Suppose the list contains at least 5 elements. Sort the first 5 elements ascen color. The content of the output file f4.txt must be the following:
(C,7,9) (D,16,7) (E,6,16) (F,5,6) (1,4,5) (J,3,4) (K,2,3)
(1,4,5) (F,5,6) (D,16,7) (C,7,9) (E,6,16) (J,3,4) (K,2,3)
Question 2: (4 marks)
In this question you should complete some methods in BSTree.java file.
The class Beaver with 3 data members: place, depth and type is given and you do not need to ec BSTree class is a binary search tree of Beaver objects. The variable depth is the key of the tre must be unique. The following methods should be completed:
void insert(String xPlace, int xDepth, int xType) - check if xPlace.charAt(0) == 'B' then do otherwise insert new Beaver with place=xPlace, depth=xDepth, type=xType to the tree (d
Zoom
+ 100%
Close

Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
CSD201_-_FA_2024_-_Block_5_-_PE_3214.webp
File size
200.6 KB
Dimensions
765px x 852px

Share this media

Back
Bên trên Bottom