PRJ302_-_PE_-_SU_2024_2158.webp
pure_pearl

PRJ302_-_PE_-_SU_2024_2158.webp

Your tasks:
Zoom
Edit index.html to create a web page and user can access your page via url /index.html (0.5 point)
Enter an integer array:
Choose an option:O Odd Even
SUM
(When the web page runs, if the interface is not the same as above, 0.5 points will be deducted)
Assume users fill the value for an array into the textfield, each element is separated by a comma "," (called a).
When users click "SUM" button, the browser makes a request to /sum using Get method (TheServlet is configured in web.xml) (0.5 point):
a. Check validate input a: If users enter all elements of array that are not integer numbers > 0,show the error text "You must input an integer array" to servlet. (1.0 point)
b. Execute:
- If users choose "Odd" option, calculate the sum of the elements in the array that are odd integer numbers, then output the result to servlet (Example: a=1,2,3,4,5 output: 9). (0.5 point)
- If users choose "Even" option, calculate the sum of the elements in the array that are even integer numbers, then output the result to servlet (Example: a=1,2,3,4,5 output: 6). (0.5 point)
Question 2:(3.0 points)
You are given a NetBeans template project (read more detail in the first page).
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRJ302_-_PE_-_SU_2024_2158.webp
File size
201.3 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom