Instructions Carefully: Mylist - Java Bstree - Java
Instructions Carefully: Mylist - Java Bstree - Java
1. Just use materials on YOUR computer (including JDK 1.8, NetBeans 8.x, etc.) for the exam
2. For distance learning: Google Meet, Hangout (for Exam Monitoring Purpose) are allowed
3. Create a folder to save given projects, e.g., CSD given (1). Download given materials to (1).
4. You just code in the file:
MyList.java for Question 1, and
BSTree.java for Question 2
5. Before submission:
Clean and Build Project" (Shift+F11), then
Rename the folder ‘dist’ to ‘run’ (if the folder ‘run’ exists, delete it before renaming).
6. Submission: to submit the project Q1, at first you must select Question No = 1, browse and select
the project folder (e.g., 1, Q1 or Q1X, etc.) then click the Submit button. Do the same for other
questions. Do not submit the un-edited given project.
7. Do not use accented Vietnamese when writing comments in programs.
8. Do not add new import statement(s) to given files.
9. Troubleshooting: if the given project runs with error, you need to run "Clean and Build Project”
(Shift+F11). If still error, rename or copy the project to another folder, e.g., from Q1 to Q1X or Q1Y,
etc
10. If at least one of the above requirements is not followed, the exam will get ZERO.
Question 1: (5 marks)
Class description: Each Apartment object has three attributes: district (String), price (int) and area (int).
Ths class is defined in the project Q1, and will be used for Question 1. You should NOT care about the
actual meaning of an Apartment in the real-world, just focus on your code.
Student tasks:
• open and build the project, if there is no error then open file MyList.java
• find the following methods, read the description and implement them accordingly
2. void f2()
3. void f3()
4. void f4()
1|Page
Question 2: (5 marks)
Class description: Each Bird object has three attributes: owner (String), price (number) and color (number).
This class is defined in the project Q2, and will be used for Question 2. You should NOT care about the
actual meaning of a Bird in the real-world, just focus on your code.
Student tasks:
• open and build the project, if there is no error then open file BSTree.java
• use Bird’s price as the key attribute when building a BST.
• find the following methods, read the description and implement them accordingly
2. void f2()
3. void f3()
4. void f4()
2|Page