sirin05137 / CSE364_Project

2 stars 0 forks source link

[FINAL] Update README.md #18

Closed yuujinleee closed 3 years ago

yuujinleee commented 3 years ago

Please review README

여기서 코멘트 달고 수정해서 최종본 만들자

마스터(깃헙 프로젝트 메인) 에 있는 README 참조

yuujinleee commented 3 years ago

필요사항

1) Error Type, handling 종류에 대해 상세히 기술?

image

2) Erro 종류 중 no given category combination

What if there exists no given category combination in the dataset? - Print a message vs output 0 average score, depending on your design described in README

yuujinleee commented 3 years ago

Design 관련

사바사 고려해서 아무것도 입력안했을때는 모든 사용자가 평가한 평점 나오게 하고 other이나 이상한 입력값 들어오면 other가 평가한 값이 나오게 하면 되겠다 ?

sanghun17 commented 3 years ago

The spacings must be omitted. Gradstudent // Supported Grad student // X

A=A.replace(" ",""); 이 코드로 빈공간 지울 수 있음!! 이 코드 추가하고, 띄워쓰기 input 으로 허용해도 좋을 것 같음!

yuujinleee commented 3 years ago

띄어쓰기

잇 근데 피아자에 보면 띄어쓰기 어차피 다 제거하고 인풋 넣을 거라고 해서 (피아자, 수업 피피티) 그 부분 코드는 추가 안 해도 될 듯?? (명목 상 써 봄) 이게 Command line input으로 받아왔을 때가 문제라서(자바 커맨드 뒤에 arg1 arg2 붙여서 실행) 띄어쓰기는 있으면 안..될거야...

파이프라인 관련

피아자 @32 앞에 백슬래쉬 붙이기 -> "" 쌍따옴표로 묶어서 인풋 넣기..?

yuujinleee commented 3 years ago

에러메시지 종류

예시는 추가해서 써놓을게 쉅끝나거

yuujinleee commented 3 years ago

21 참조 (최신본)

현재 코드 Error message

no. Error name Code Message Description
1 INPUT_ERROR 1 Emtpy input!
2 INPUT_ERROR 2 is invalid!
3 INPUT_ERROR: 3 genre input input_string is invalid genre.
4 INPUT_WWAN 4 Entered occupation doesn't exist in DB. shown rating is rated by other.
5 NO_DATA 5 Your genre input is valid. but there is no rating which has all matched genres and occupation.

개선안

image

Table 1 Invalid input errors
비고 Error name Code Message Description
위에1번 InputEmptyError 1 No argument has passed. 2 arguments are required. (InputStr1 InputStr2) Thrown when no input is entered.
위에2번 InputInvalidError 4 Entered input is invalid Thrown when entered inputs are invalid.
위에3번 InputInvalidError 5 Entered genre doesn't exist. ( Invalid word : input_string ) Thrown when the word in 1st input is invalid.
Table 2 Invalid input warning
비고 Error name Code Message Description
위에4번 InputInvalidWarning 6 Entered occupation doesn't exist. Rating by 'other' is shown instead. Thrown when the 2nd input is invalid.
Table 3 etc
비고 Error name Code Message Description
위에5번 NoDBError 8 Rating data matching the input pair doesn't exist. Thrown when there's no available rating data for the genre-occupation input pair.

추가해야 되는 에러

비고 Error name Code Message Description
추가 요 InputNumError 2 Only 1 input has passed. 2 arguments are required. 인풋 개수 1 일때
추가 요 InputNumError 3 More than 2 arguments have passed. 2 arguments are required. 인풋 개수 2보다 클 때
추가 요 NoDBError 7 Movie data matching the entered genre combination doesn't exist. movies.dat에 장르콤비네이션에 해당하는 영화가 하나도 없을 때

Print 예시

InputEmptyError : No argument has passed. 2 arguments are required. (InputStr1 InputStr2)
(Error code: 1)

또는

InputEmptyError : No argument has passed. 2 arguments are required. (InputStr1 InputStr2)
Error code: 1

이런 식으로..? 더 나은 포맷 아이디어 있음 알려주라

++추가 Exit code 주로 사용되는 Rule (3번자료)

Program exit 성공 시 ➡️ 0 일반적인 에러 ➡️ 1

에러/경고 메시지 뒤에 모두 exit code 1로 바꾸면 될 듯? -> 적용완료

System.exit(1);

참고자료

  1. https://developer.apple.com/documentation/businesschatapi/messages_sent/interactive_messages/authentication/error_codes
  2. Microsoft Error Messages (Design basics)
  3. Exit Codes With Special Meanings
yuujinleee commented 3 years ago

Error code 용 Test Input

21 로 옮김요 !

yuujinleee commented 3 years ago

You can see the final README updated on github mainpage.