JAVA ☕️
Beatcamp;
Theory01. 클래스와 객체
- 객체 지향의 개념과 특성 이해
- 자바 클래스 만들기
- 생성자 만들기
- 객체 배열 선언 및 활용
- 객체 치환 이해
- 객체의 소멸과 가비지 컬렉션
- 클래스와 멤버에 대한 접근 지정
- static 속성을 가진 멤버의 특성
- final로 선언된 클래스, 메소드, 필드에 대한 이해
HW01. 끝말잇기 게임 만들기
HW02. 상속관계 클래스 작성하기
Codeit;
[자바 왕기초] 05. 배열
04. DNA 염기 서열 분석
Book 📚
[Java의 정석] Chapter05. 배열
02. String배열
- String배열의 선언과 생성
- String배열의 초기화
- char배열과 String클래스
- 커맨드 라인을 통해 입력받기
03. 다차원 배열
- 2차원 배열의 선언과 인덱스
- 2차원 배열의 초기화
- 가변 배열
- 다차원 배열의 활용
Study 🛠
Inflearn;
[8명의 비전공자는 어떻게 개발자로 취업했을까] 05. 실제 취업을 위한 과정 / 이력서 / 포트폴리오 준비 팁 / 어디서도 알려주지 않는 면접 팁
03. 개발자 취업을 위한 구체적인 준비 방법 - 이력서 작성법 / 포트폴리오 작성법 / 그 외의 준비
04. 면접 꿀팁 / 나를 뽑아야 할 이유 만들기
[8명의 비전공자는 어떻게 개발자로 취업했을까] 06. 직접 기획에서 나만의 프로젝트 만드는 방법
01. 나만의 프로젝트 만들기 / 기획 툴 등의 간단 소개 / 클론 코딩 강의들 활용하기
[8명의 비전공자는 어떻게 개발자로 취업했을까] 07. 시작하기 전에 미리 알았더라면 - 시행착오를 덜 할 수 있는 개발 공부 방법
01. 보다 나은 개발 공부를 위한 실제적인 팁
모든 학습을 끝낸 후 TIL(Today, I Learned)을 쓰는 것도 좋지만, 학습을 시작하기 전 대략적인 목표를 정해놓는 것으로 활용해도 좋은 것 같다. 목표를 정해놓으면 적어도 그 목표에 가까이 가려고 노력을 하게 되기 때문이다. 꾸준한 개발 습관을 가질 수 있는 장점이 있고, 꾸준히 하면 좋은 일이 생길 것이라는 생각도 든다.
Codeit; "DNA 염기 서열 분석" 실습 과제 어렵다... 해설 보고 다시 한번 풀어봐야겠다. 요즘은 Beatcamp; 진도가 급발진해서 쭉~ 쭉~ 나가는 바람에 복습이 너무 힘들어졌다 🥺 어떻게 하면 복습을 안 밀리고 잘할 수 있을까? 죽겠다 정말~
오늘 6시에 일어나서 그런지 너무 피곤해서 수업 시간에 졸렸다 😴😴 내일은 7시에 일어나서 오늘 못다한 강의 복습을 해야겠다
Beatcamp; HW01. 끝말잇기 게임 만들기
import java.util.Scanner;
public class Player {
String name;
String selectWord;
public Player(String name) {
this.name = name;
}
public void getWordFromUser() {
Scanner scan = new Scanner(System.in);
System.out.println(this.name);
this.selectWord = scan.nextLine(); // 단어를 입력하여 player 객체에 저장한다.
}
public boolean checkSuccess(String prevWord) {
if (this.selectWord.charAt(0) == prevWord.charAt((prevWord.length() - 1))) {
return true;
}
return false;
}
}
import java.util.Scanner;
public class WordGameApp {
static void run() {
Scanner scan2 = new Scanner(System.in);
String prevWord = "아버지";
System.out.println("끝말잇기 게임 시작!");
System.out.println("참여하는 인원은 몇명입니까?");
int num = scan2.nextInt();
scan2.nextLine();
Player siri[] = new Player[num];
for (int i = 0; i < siri.length; i++) {
System.out.println("참가자의 이름을 입력하세요");
String name = scan2.nextLine();
siri[i] = new Player(name);
}
System.out.println("시작하는 단어는" + prevWord + "입니다.");
for (int i = 0; ; i++) {
siri[i].getWordFromUser();
if (!siri[i].checkSuccess(prevWord)) {
System.out.println(siri[i].name + "이 졌습니다.");
break;
}
prevWord = siri[i].selectWord;
if (i == num - 1) {
i = -1;
}
}
}
public static void main(String args[]) {
WordGameApp.run();
}
}
Beatcamp; HW02. 상속관계 클래스 작성하기
import java.util.ArrayList;
import java.util.Scanner;
public class ProductInfo {
static ArrayList<Object> productList = new ArrayList<>();
static void ProductAdd() {
Scanner scan = new Scanner(System.in);
System.out.println("상품 종류 : 책(1), 음악CD(2), 회화책(3)");
Object k = null;
int number = scan.nextInt();
switch (number) {
case 1 :
k = new Book();
break;
case 2 :
k = new CompactDisc();
break;
case 3 :
k = new ConversationBook();
break;
}
k.input();
k.setId(productList.size());
productList.add(k);
}
public static void main(String[] args) {
int number;
Scanner scan = new Scanner(System.in);
while (true) {
System.out.println("번호를 입력하세요. 상춤추가(1), 모든 상품 조회(2), 종료(3)");
number = scan.nextInt();
if (number == 1) {
ProductAdd();
} else if (number == 2) {
for (int i = 0; i < productList.size(); i++) {
productList.get(i).print();
System.out.println();
}
} else if (number == 3) {
break;
} else {
System.out.println("번호를 잘못 입력했습니다.");
}
}
}
}
import java.util.Scanner;
public class Product {
int identifier;
int price;
String explanation;
String producer;
void setId(int id) {
identifier = id;
}
int getId() {
return identifier;
}
void input() {
Scanner scan = new Scanner(System.in);
System.out.println("상품 설명을 입력하세요.");
explanation = scan.nextLine();
System.out.println("생산자를 입력하세요.");
explanation = scan.nextLine();
System.out.println("가격을 입력하세요.");
price = scan.nextInt();
}
void print(){
System.out.println("상품 ID");
System.out.println("상품 설명");
System.out.println("생산자");
System.out.println("가격");
}
}
import java.util.Scanner;
public class Book extends Product {
int ISBNnum;
String writer;
String bookTitle;
void input(){
super.input();
Scanner scan = new Scanner(System.in);
System.out.println("책 제목을 입력하세요.");
bookTitle = scan.nextLine();
System.out.println("저자를 입력하세요.");
writer = scan.nextLine();
System.out.println("ISBN 번호를 입력하세요.");
ISBNnum = scan.nextInt();
}
}
import java.util.Scanner;
public class ConversationBook extends Product {
String languageInfo;
void input() {
super.input();
Scanner scan = new Scanner(System.in);
System.out.println("언어를 입력하세요.");
languageInfo = scan.nextLine();
}
void print() {
super.print();
System.out.println("언어는 " + languageInfo + "입니다.");
}
}
import java.util.Scanner;
public class CompactDisc extends Product {
String albumTitle;
String singerName;
void input() {
super.input();
Scanner scan = new Scanner(System.in);
System.out.println("앨범 제목을 입력하세요.");
albumTitle = scan.nextLine();
System.out.println("가수를 입력하세요.");
singerName = scan.nextLine();
}
void print() {
super.print();
System.out.println("앨범 제목은 " + albumTitle +"입니다.");
System.out.println("가수 이름은 " + singerName +"입니다.");
}
}
'CodeSiri > TIL' 카테고리의 다른 글
[TIL] 2021.01.27 (0) | 2021.01.27 |
---|---|
[TIL] 2021.01.26 (4) | 2021.01.26 |
[TIL] 2021.01.23 (0) | 2021.01.23 |
[TIL] 2021.01.22 (0) | 2021.01.22 |
[TIL] 2021.01.21 (0) | 2021.01.21 |