CSD201_-_PE_-_SP_2024_-_s_-_10_1506.webp
T

CSD201_-_PE_-_SP_2024_-_s_-_10_1506.webp

For distance learning: Google Meet, Hangout (for Exam Monitoring Purpose).
Follow the steps below to complete PE:
1. Create a folder to save given projects, e.g. CSD_given (1). Down load given materials to (1).
2. Steps to do question 1 (do the same for questions 2 and 3): Open NetBeans, open the given Q1 project,
then edit the MyList.java file according to the requirements of the exam. (edit the file BSTree.java for
Q2 and Graph.java for Q3).3. Before submission: Run the function "Clean and Build Project" (Shift+F11), to ensure BUILD SUCCESSFUL (if not, the project will get 0 mark).
4. 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,...) then click the Submit button. Do the same for other questions.Do not submit the un-edited given project. If project is too big for submission, delete all f1.txt, f2.txt,....
5. Do not use accented Vietnamese when writing comments in programs.
6. Do not add new import statement(s) to given files.
7. Software tools must be used: NetBeans IDE 8.x and Java JDK 1.8.
If at least one of the above requirements is not followed, the exam will get ZERO.
Trouble shooting:
If the given project (e.g. Q1) runs with error, you need to run "Clean and Build Project" (Shift+F11). If still error, try to rename or copy the project to other one, e.g. from Q1 to Q1X or Q1Y,...
Do not pay attention to real meaning of objects, variables and their values in the questions below.
Question 1: (4 marks)
In this question you should complete some methods in MyList.java file.
The class Bottle with 3 data members: maker, volume and color is given and you do not need to edit it.The MyList class is a linked list of Bottle objects. The following methods should be completed:
void addLast(String xMaker, int xVolume, int xColor) - check if xMaker.charAt(0) == 'A' then do
nothing, otherwise add new node with maker=xMaker, volume=xVolume, color=xColor to the end
of the list. (volume and color can get arbitrary, even negative values).
void f1() - Do not edit this method. Your task is to complete the addLast(...) method above only.
Output in the file f1.txt must be the following:
(B,5,3) (C,6,5) (D,2,4) (E,7,9) (F,4,-7) (G,-3,2)
Zoom
+ 100%
Close

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

Thông tin

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

Image metadata

Filename
CSD201_-_PE_-_SP_2024_-_s_-_10_1506.webp
File size
315.9 KB
Dimensions
947px x 898px

Share this media

Back
Bên trên Bottom