PRN222_-_PE_-_SU_2025_-_Block_1_3979.webp
K

PRN222_-_PE_-_SU_2025_-_Block_1_3979.webp

☑Kizspy.me
Continuously prompt the user to enter an integer (employee ID) via the console.
If the user presses Enter (empty input), the program terminates.
2. Validate Input:
-
Check if the user input is a valid integer.
If the input is not a valid integer, display an error message (e.g., "Invalid input! Please enter a valid
integer.") and prompt the user to try again.
3. Connect to the Server:
-
Establish a TCP connection to the server at 127.0.0.1:2000.
Send the integer (employee ID) entered by the user to the server.
If the server is not running or the connection fails, display an error message (e.g., "Server is not
running. Please try again later.") and return to waiting for new user input.
Y:\Teaching\PRN_PESC X
Client started. Enter an employee ID (integer) or press Enter to exit.
Enter employee ID: 1
Server is not running. Please try again later.
Enter employee ID:
4. Process Server Response:
-
Receive the JSON string from the server and deserialize it into a list of projects.
Each project includes: ID, Title, Description, and the employee's Position in the project.
Display each project's information on the console in a clear format
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom