This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
public class Application { | |
private static List<Peg> pegs = new ArrayList<>(); | |
private static int numOfMoves = 0; | |
private static int maxDisk = 3; | |
public static void main(String[] args) { | |
System.out.println("Tower Of Hanoi, deconstructed! "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
from botocore.exceptions import ClientError | |
__aws_access_key_id__ = '<AWS_ACCESS_KEY_ID>' | |
__aws_secret_access_key__ = '<AWS_SECRET_ACCESS_KEY>' | |
def create_s3_bucket(bucket_name): | |
print("Creating a bucket... " + bucket_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AgeUserValidator implements UserValidator { | |
@Override | |
public void validate(User user) { | |
if(user.age <= 0 || user.age > 99) { | |
System.out.println("에러: 올바른 나이를 입력해주세요."); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package animal; | |
public abstract class Animal { | |
public String name; | |
public int food = 0; // 밥그릇에 있는 밥 | |
public int portion = 10; // 한번에 먹을수 있는 양 | |
public int hunger = 30; // 얼마나 배고픈지 | |
public Animal(String name) { | |
this.name = name; |