Giken Dev
article thumbnail
[Java] ์ถ”์ƒํด๋ž˜์Šค(abstract class)์™€ ์ธํ„ฐํŽ˜์ด์Šค(interface)

abstract class Animal { // ์ถ”์ƒ ๋ฉ”์„œ๋“œ: ํ•˜์œ„ ํด๋ž˜์Šค์—์„œ ๋ฐ˜๋“œ์‹œ ๊ตฌํ˜„ํ•ด์•ผ ํ•จ abstract void makeSound(); // ์ผ๋ฐ˜ ๋ฉ”์„œ๋“œ: ํ•˜์œ„ ํด๋ž˜์Šค์—์„œ ์žฌ์ •์˜ํ•  ์ˆ˜๋„, ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Œ void eat() { System.out.println("๋™๋ฌผ์ด ๋จน์ด๋ฅผ ๋จน์Šต๋‹ˆ๋‹ค."); } } interface Swimmer { // ์ถ”์ƒ ๋ฉ”์„œ๋“œ: ๊ตฌํ˜„ ํด๋ž˜์Šค์—์„œ ๋ฐ˜๋“œ์‹œ ๊ตฌํ˜„ํ•ด์•ผ ํ•จ void swim(); } // ๊ตฌํ˜„ ํด๋ž˜์Šค class Dog extends Animal implements Swimmer { @Override void makeSound() { System.out.println("๊ฐœ๊ฐ€ ์ง–์Šต๋‹ˆ๋‹ค."); } @Override public void swim() { Sys..

article thumbnail
[Java] ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์œผ๋กœ ๊ฐœ๋ฐœํ•ด์•ผํ•˜๋Š” ์ด์œ  / ํด๋ž˜์Šค์™€ ์ƒ์†

์ ˆ์ฐจ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ → ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ(OOP) ์ ˆ์ฐจ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์˜ˆ์ œ public class ProceduralExample { public static void main(String[] args) { int width = 5; int height = 10; int area = calculateArea(width, height); System.out.println("์‚ฌ๊ฐํ˜•์˜ ๋„“์ด: " + area); } static int calculateArea(int width, int height) { return width * height; } } -> ์ด ์˜ˆ์ œ์—์„œ๋Š” ํ•จ์ˆ˜ calculateArea๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์‚ฌ๊ฐํ˜•์˜ ๋„“์ด๋ฅผ ๊ณ„์‚ฐํ•œ๋‹ค. ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์˜ˆ์ œ class Rectangle { private ..

article thumbnail
[๋„ค์ด๋ฒ„ ๋ถ€์ŠคํŠธ์บ ํ”„ 8๊ธฐ ์›น๋ชจ๋ฐ”์ผ] 1์ฐจ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ํ•ฉ๊ฒฉ ํ›„๊ธฐ

1์ฐจ ์ฝ”๋”ฉํ…Œ์ŠคํŠธ ํ‰์†Œ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ค€๋น„๋ฅผ ๋‚˜๋ฆ„ ์—ด์‹ฌํžˆํ–ˆ๋‹ค. ๋ฐฑ์ค€ ์‹ค๋ฒ„~ํ”Œ๋ ˆ ํ•˜์œ„ ๋ฌธ์ œ๋ฅผ 300 ๋ฌธ์ œ ํ’€์—ˆ๊ณ , ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค์—์„œ๋„ lv3 ๊นŒ์ง€ 100 ๋ฌธ์ œ๋ฅผ ํ’€์—ˆ๋‹ค. ๋ฌธ์ œ๋Š” ๊ฐ๊ด€์‹ 10๋ฌธ์ œ(์•„๋งˆ๋„), ์•Œ๊ณ ๋ฆฌ์ฆ˜ 2๋ฌธ์ œ ๊ฐ€ ๋‚˜์™”๋Š”๋ฐ ๊ฐ๊ด€์‹์ด ์ƒ๊ฐ๋ณด๋‹ค ๊นŒ๋‹ค๋กœ์› ๋˜ ๋Š๋‚Œ์ด๋‹ค. ์ „๊ณต์ž์ด์ง€๋งŒ cs ๋ฅผ ๋งŽ์ด ์•ˆ ๋ดค๋˜ ํƒ“์ด๋ ค๋‹ˆ.. ์•Œ๊ณ ๋ฆฌ์ฆ˜ 1๋ฒˆ ์ถœ๋ ฅ์„ ๊นŒ๋‹ค๋กญ๊ฒŒ ์š”๊ตฌํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ๋‚˜์™”๋‹ค. ์ƒ์‹๊ณผ, ๊ตฌํ˜„๋ ฅ์„ ์š”๊ตฌํ•˜๋Š” .. ? ํŒŒ์•…ํ•˜๊ณ  ์ฝ”๋“œ ๊ตฌํ˜„ํ•˜๋Š”๋ฐ์— ์‹œ๊ฐ„์ด ์˜ค๋ž˜๊ฑธ๋ฆด๊ฒƒ ๊ฐ™์•„์„œ 2๋ฒˆ ๋จผ์ € ํ’€๊ณ ์™”๋Š”๋ฐ, 0.5์†”ํ•˜๊ณ  ์‹œ๊ฐ„ ์ด์Šˆ๋กœ ์ œ์ถœ .. ์•Œ๊ณ ๋ฆฌ์ฆ˜ 2๋ฒˆ ๊ตฌํ˜„๋ ฅ์„ ์š”๊ตฌํ•˜๋Š” ๋ฌธ์ œ์˜€๋‹ค. ๊ทผ๋ฐ ๋ฌธ์ œ๊ฐ€ ๊ฐ€๋…์„ฑ์ด ์ข€ .... IDE ๋ถˆ๊ฐ€๋Šฅ์€ ๊ตฌํ˜„ ๋ฌธ์ œ์—์„œ ํฐ ํ•ธ๋””์บก์€ ์•„๋‹ˆ์—ˆ๋‹ค๊ณ  ์ƒ๊ฐํ•œ๋‹ค. ์ˆœ์กฐ๋กญ๊ฒŒ ์˜ˆ์™ธ์ผ€์ด์Šค๊นŒ์ง€ ์ƒ๊ฐํ•ด์„œ ํ’€์—ˆ๋‹ค. ์ง€๊ธˆ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์กฐ..

article thumbnail
[๋ฐฑ์—”๋“œ] ์Šคํ”„๋ง ํ•ต์‹ฌ ์›๋ฆฌ ๊ธฐ๋ณธํŽธ ์ •๋ฆฌ
์„œ๋ฒ„/Spring 2023. 4. 27. 06:20

https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81-%ED%95%B5%EC%8B%AC-%EC%9B%90%EB%A6%AC-%EA%B8%B0%EB%B3%B8%ED%8E%B8#curriculum ์Šคํ”„๋ง ํ•ต์‹ฌ ์›๋ฆฌ - ๊ธฐ๋ณธํŽธ - ์ธํ”„๋Ÿฐ | ๊ฐ•์˜ ์Šคํ”„๋ง ์ž…๋ฌธ์ž๊ฐ€ ์˜ˆ์ œ๋ฅผ ๋งŒ๋“ค์–ด๊ฐ€๋ฉด์„œ ์Šคํ”„๋ง์˜ ํ•ต์‹ฌ ์›๋ฆฌ๋ฅผ ์ดํ•ดํ•˜๊ณ , ์Šคํ”„๋ง ๊ธฐ๋ณธ๊ธฐ๋ฅผ ํ™•์‹คํžˆ ๋‹ค์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค., - ๊ฐ•์˜ ์†Œ๊ฐœ | ์ธํ”„๋Ÿฐ www.inflearn.com ๊ฐ์ฒด ์ง€ํ–ฅ ์„ค๊ณ„์™€ ์Šคํ”„๋ง ์Šคํ”„๋ง์ด๋ž€?

article thumbnail
ChatGPT๋กœ ๊ฐ„๋‹จํ•œ ์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ - 3

https://spartacodingclub.kr/online/special/chatgpt ๋ฅผ ์ˆ˜๊ฐ•ํ•˜๋ฉด์„œ ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•œ ํˆด : 1. ChatGPT https://chat.openai.com/ 2. IntelliJ (IDE) chatGPT๋กœ 10๋ถ„ ๋งŒ์— ์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ | ์ŠคํŒŒ๋ฅดํƒ€์ฝ”๋”ฉํด๋Ÿฝ ๋ฌด๋ฃŒํŠน๊ฐ• ์ฝ”๋”ฉ์— chatGPT๋ฅผ ๋”ํ•ด ๋ˆ„๊ตฌ๋ณด๋‹ค ๋น ๋ฅด๊ฒŒ ์›น์„ ๊ตฌํ˜„ํ•ด๋ณด์„ธ์š”. ์ƒ์‚ฐ์„ฑ๊ณผ ํšจ์œจ์„ฑ์„ ๊ทน๋Œ€ํ™” ํ•˜๋Š” chatGPT ์ œ์ผ ์ž˜ ์“ฐ๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค๋“œ๋ ค์š”. spartacodingclub.kr https://giken.tistory.com/entry/ChatGPT%EB%A1%9C-%EA%B0%84%EB%8B%A8%ED%95%9C-%EC%9B%B9%EC%82%AC%EC%9D%B4%ED%8A%B8-%EB%A7%8..

article thumbnail
ChatGPT๋กœ ๊ฐ„๋‹จํ•œ ์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ - 2

https://spartacodingclub.kr/online/special/chatgpt ๋ฅผ ์ˆ˜๊ฐ•ํ•˜๋ฉด์„œ ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•œ ํˆด : 1. ChatGPT https://chat.openai.com/ 2. IntelliJ (IDE) chatGPT๋กœ 10๋ถ„ ๋งŒ์— ์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ | ์ŠคํŒŒ๋ฅดํƒ€์ฝ”๋”ฉํด๋Ÿฝ ๋ฌด๋ฃŒํŠน๊ฐ• ์ฝ”๋”ฉ์— chatGPT๋ฅผ ๋”ํ•ด ๋ˆ„๊ตฌ๋ณด๋‹ค ๋น ๋ฅด๊ฒŒ ์›น์„ ๊ตฌํ˜„ํ•ด๋ณด์„ธ์š”. ์ƒ์‚ฐ์„ฑ๊ณผ ํšจ์œจ์„ฑ์„ ๊ทน๋Œ€ํ™” ํ•˜๋Š” chatGPT ์ œ์ผ ์ž˜ ์“ฐ๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค๋“œ๋ ค์š”. spartacodingclub.kr ๋‚˜๋งŒ์˜ ๋ฅดํƒ„๋งˆ์ผ“ ์ง‘์— ์žˆ๋Š” ๋ฌผ๊ฑด์„ ํŒ๋‹ˆ๋‹ค! ๋งˆ์ผ“์˜ ํ™ˆ ์—๋‹ค๊ฐ€ ๋ฌผ๊ฑด ์ •๋ณด๋ฅผ ๋‹ด์„ ํŽ˜์ด์ง€๋ฅผ ์นด๋“œ ํ˜•์‹์œผ๋กœ ๋งŒ๋“ค์–ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. gpt ์—์„œ new chat ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ html ํ…œํ”Œ๋ฆฟ์„ ์ค๋‹ˆ๋‹ค. ์ด๋ฒˆ์—๋Š” img ํŒŒ์ผ์„ ์š”์ฒญ..

[๋ฐฑ์ค€][Java] 5430๋ฒˆ : AC ๋ฌธ์ œํ’€์ด & ์ฝ”๋“œ

https://www.acmicpc.net/problem/5430 5430๋ฒˆ: AC ๊ฐ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค์— ๋Œ€ํ•ด์„œ, ์ž…๋ ฅ์œผ๋กœ ์ฃผ์–ด์ง„ ์ •์ˆ˜ ๋ฐฐ์—ด์— ํ•จ์ˆ˜๋ฅผ ์ˆ˜ํ–‰ํ•œ ๊ฒฐ๊ณผ๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. ๋งŒ์•ฝ, ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ ๊ฒฝ์šฐ์—๋Š” error๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. www.acmicpc.net ์‹ค์ œ๋กœ ๋ฐฐ์—ด์„ ๋’ค์ง‘์–ด๊ฐ€๋ฉด์„œ ํ•˜๋ฉด, ์‹œ๊ฐ„์ดˆ๊ณผ๊ฐ€ ๋‚ฌ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ deque๋ฅผ ํ†ตํ•ด ์•ž ๋’ค์˜ ์‚ญ์ œ๋ฅผ ํ•ด์ค๋‹ˆ๋‹ค. ๋’ค์ง‘์–ด์ง„ ์ƒํƒœ๋Š” reverse ๋ผ๋Š” boolean ๋ณ€์ˆ˜๋ฅผ ํ†ตํ•ด์„œ ์ปจํŠธ๋กคํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ์ด ๋ฌธ์ œ์—์„œ๋Š” stringbuilder๋ฅผ ์จ์•ผ๋งŒ ์‹œ๊ฐ„์ดˆ๊ณผ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค !! package WEEK0.P5430; import java.io.BufferedReader; import java.io.FileInputStream; import java.i..

article thumbnail
ChatGPT๋กœ ๊ฐ„๋‹จํ•œ ์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ - 1

https://spartacodingclub.kr/online/special/chatgpt ๋ฅผ ์ˆ˜๊ฐ•ํ•˜๋ฉด์„œ ๋‚ด์šฉ์„ ์ž‘์„ฑํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•œ ํˆด : 1. ChatGPT https://chat.openai.com/ 2. IntelliJ (IDE) chatGPT๋กœ 10๋ถ„ ๋งŒ์— ์›น์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ | ์ŠคํŒŒ๋ฅดํƒ€์ฝ”๋”ฉํด๋Ÿฝ ๋ฌด๋ฃŒํŠน๊ฐ• ์ฝ”๋”ฉ์— chatGPT๋ฅผ ๋”ํ•ด ๋ˆ„๊ตฌ๋ณด๋‹ค ๋น ๋ฅด๊ฒŒ ์›น์„ ๊ตฌํ˜„ํ•ด๋ณด์„ธ์š”. ์ƒ์‚ฐ์„ฑ๊ณผ ํšจ์œจ์„ฑ์„ ๊ทน๋Œ€ํ™” ํ•˜๋Š” chatGPT ์ œ์ผ ์ž˜ ์“ฐ๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๋ ค๋“œ๋ ค์š”. spartacodingclub.kr ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ๋Œ์–ด์™€์„œ head ์— ๋„ฃ์–ด์ฃผ๋Š” ๊ธฐ๋ณธ html ํ‹€์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ฒƒ์„ gpt ์—๊ฒŒ ๋„˜๊ฒจ์ค๋‹ˆ๋‹ค. ๋Œ€๋‹ต์„ ํ•˜์ง€๋งˆ๋ผ๊ณ  ๋ง๋ถ™์—ฌ์„œ ๋Œ€๋‹ต ์‹œ๊ฐ„์„ ๋‹จ์ถ•์‹œ์ผœ์ค๋‹ˆ๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„ ์ด์šฉํ•œ ๋ฒ„ํŠผ์„ ๋งŒ๋“ค์–ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. ๋ถ€ํƒํ•˜์ง„ ..