CSD201_Fall-2023_HCM_Ca_2_1980.webp
Thanh Loan1

CSD201_Fall-2023_HCM_Ca_2_1980.webp

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.
Troubleshooting:
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.
VERFLOWIGO M
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 Plane with 3 data members: type, capacity, and price. Several files are given and you do not edit them. The MyList class is a linked list of Plane objects. The following methods should be completed:
void addLast(String xType, int xCapacity, int xPrice)- Check if xPrice<1000 then do nothing, otherwise add new node with type=xType, capacity=xCapacity, price=xPrice to
the end of the list.
void f1() - This method is used to test the addLast method above. You do not need to edit this function. Output in the file f1.txt must be the following:
Content of the file f1.txt:
(A,9,1500) (8,5,3000) (C,6,5000) (E,7,9000) (F,4,7000)
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
CSD201_Fall-2023_HCM_Ca_2_1980.webp
File size
133.5 KB
Dimensions
1552px x 619px

Share this media

Back
Bên trên Bottom