전체 글 (94) 썸네일형 리스트형 백준 1748 : 수 이어 쓰기 (1) c++ 코드 #include using namespace std; int main(){ int n; cin >> n; int ans = 0; for(int i = 1; i 백준 4375 : 1 c++ 코드 #include using namespace std; int main(){ int n; while(cin >> n){ int ans = 1; int a = 1; while(a%n != 0){ ans++; a = a * 10 + 1; a %= n; } cout 5. 모델링 - 객체지향모델링 Class Diagram Class Diagram : 정적Diagram 추상 Class( Abstract class) : 추상 method가 있는 class 추상 method : 실제로 구현이 안되어있는 method ex) Shape라는 클래스를 상속받은 Circle, rectangle, Shape에 있는 Draw() 함수 - Shape에서 구현 불가 (표준화를 위함) interface Class :추상 메소드만 가지는 class - 이를 상속받을 때는 점선으로 표시함 (대체로 이름이 ~able로 이루어짐) - 상속(inheritance) : IS_A 관계 -> 세모로 표현 서브클래스가 슈퍼클래스의 속성을 "상속"받는 것을 의미 + 서브클래스의 또 다른 속성 ex) 사람클래스를 상속받은 학생, 학생클래스.. 이전 1 ··· 4 5 6 7 8 9 10 ··· 32 다음 목록 더보기