U E D R , A S I H C RSS

새싹교실/2021/카라반/0329

Difference between r1.16 and the current

@@ -216,7 +216,7 @@
----
'''강필중'''
* 난이도: 7/10
* 후기:
* 후기: 전반적으로 이해하기는 쉬웠으나, 내용이 많아 외우기 힘들 것 같았고 직접적인 실습이 없어서 아쉬웠다.
----
'''이길상'''
* 후기: 난이도는 올렸는데 강의력이 하강한듯. 다음에는 시간을 충분히 가지고 코딩을 진행할 예정




1. 참여자 명단


단장 이길상 16학번 참석
단원 강필중 21학번 참석
권재민 참석
김민경 참석
이수은 개인사정에 의한 불참

2. 수업

2.1. 진행

1. 장소 : 구글 미츠
2. 시간 : 19시 ~ 21시

2.2. 내용

배열
  • 배열의 선언과 초기화, 다차원배열과 가변배열

클래스와 메소드
  • 인스턴스와 클래스, static 키워드를 중심으로 설명

ppt

3. 코드

3.1. 예제1

import java.util.Arrays;

public class App {
    public static void main(String[] args) throws Exception {
        int[] arr1;
        int arr2[];
        int i, arr3[];

        i =22;
        arr3 = new int[3];

        int[] arr4 = new int[5];

        for(int x = 0; x<5; x++){
            System.out.println(arr4[x]);
        }

        arr4[0] = 22;
        System.out.println(Arrays.toString(arr4));

        //arr4[5] = 55;
        arr4[4] = 44;
        System.out.println(Arrays.toString(arr4));
        System.out.println(arr4.length);

        arr3 = new int[0];   
        System.out.println(Arrays.toString(arr3));
        System.out.println(arr3.length);

        System.out.println(arr4[0] + "" + arr4[4]);

        String str = "abc";
        char[] ch = new char[]{'a', 'b', 'c'};

        System.out.println(str.length());
        System.out.println(ch.length);

        arr1 = new int[3];
        System.out.println(arr1);
        arr1 = new int[]{4, 3, 4, 5, 3};
        System.out.println(arr1);
        
        arr1 = new int[]{1,2,3,4,5};
        // arr2 = new int[5];
        /*
        for(int x = 0; x<5; x++){
            arr2[x] = arr1[x];
        }
        */
        // arr2 = Arrays.copyOfRange(arr1, 1, 3);

        // System.arraycopy(arr1, 1, arr2, 3, 2);

        arr2 = arr1.clone();

        System.out.println(Arrays.toString(arr1));
        System.out.println(Arrays.toString(arr2));

        System.out.println(arr1);
        System.out.println(arr2);
    }
}


3.2. 예제2

import java.util.Arrays;
import java.util.Scanner;

public class App2 {
    public static void main(String[] args) {
        int[][] arr1;
        int[] arr2[];
        int arr3[][];

        arr1 = new int[4][3];

        System.out.println(arr1);
        System.out.println(Arrays.toString(arr1));
        //System.out.println(Arrays.toString(arr1[0]));

        for(int i=0; i<arr1.length; i++){
            System.out.println(Arrays.toString(arr1[i]));
        }

        arr2 = new int[3][];

        arr2[0] = new int[3];
        arr2[1] = new int[5];
        arr2[2] = new int[4];

        for(int i=0; i<arr2.length; i++){
            System.out.println(Arrays.toString(arr2[i]));
        }

        System.out.println("----------");

        Scanner sc = new Scanner(System.in);

        int x = sc.nextInt();
        arr3 = new int[x][];

        for(int i=0; i<arr3.length; i++){
            arr3[i] =  new int[sc.nextInt()];
        }

        for(int i=0; i<arr3.length; i++){
            System.out.println(Arrays.toString(arr3[i]));
        }

        sc.close();
    }
}


3.3. 예제3

import java.util.Arrays;
import java.util.Scanner;

public class App3 {
    public static void main(String[] args) {
        Tv.model();

        Tv tv1 = new Tv();
        tv1.changeChannel(22);

        tv1.currentChannel();
   
        tv1.changeChannel("33");

        tv1.currentChannel();
        
    }
}

class Tv{
    String color;
    boolean power;
    int channel;
    static int modelNum = 2022;

    void power(){
        power = !power;
    }

    void currentChannel(){
        System.out.println("현재 채널: " + channel);
    }

    void changeChannel(int channel){
        this.channel = channel;
    }
    
    void changeChannel(String channel){
        this.channel = Integer.parseInt(channel);
    }

    static void model(){
        System.out.println("모델명: " + modelNum);
    }

    static void change(int a){
        modelNum += a;
    }

}


4. 숙제

1. 회고 작성

2. 없음

5. 회고록

권재민
  • 난이도: 7.5/10
  • 후기: 이해는 잘 되었으나 머리에 많이 남지는 않을 것 같다. 조금 어려운게 많이 들어왔다.

이수은
  • 난이도: /10
  • 후기:

김민경
  • 난이도: 8/10
  • 후기: 내용은 좀 어려웠지만 따라갈만했고, 타이핑 하면서 듣느라 살짝 헷갈렸는데 다시 설명해주셔서 이해할 수 있었습니다. 감사합니다.

강필중
  • 난이도: 7/10
  • 후기: 전반적으로 이해하기는 쉬웠으나, 내용이 많아 외우기 힘들 것 같았고 직접적인 실습이 없어서 아쉬웠다.

이길상
  • 후기: 난이도는 올렸는데 강의력이 하강한듯. 다음에는 시간을 충분히 가지고 코딩을 진행할 예정








Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-03-29 12:31:22
Processing time 0.1041 sec