package kr.or.ddit.homework; import java.util.Calendar; import java.util.Scanner; public class HomeWork17 { Scanner sc = new Scanner(System.in); Calendar cal = Calendar.getInstance(); public static void main(String[] args) { HomeWork17 hw = new HomeWork17(); hw.process(); } public void process() { while (true) { // 다음달 출력하기 int last = cal.getActualMaximum(Calendar.DAY_OF_MONTH); int mon..
Java_Homework
import java.util.Scanner; public class HomeWork14 { int cur = 0; // 회원 저장 수 User[] userList = new User[100]; Scanner sc = new Scanner(System.in); public static void main(String[] args) { HomeWork14 hw = new HomeWork14(); hw.process(); } public void process() { while (true) { // 1.회원가입, 2.회원탈퇴, 3.정보수정, 4.회원전체정보출력 System.out.println("┌────────────┐"); System.out.println(" 1. 회원가입"); System.out.pri..
import java.util.ArrayList; import java.util.Arrays; import java.util.Random; import java.util.Scanner; public class HomeWork13 { // 로또 길이 int length = 8; // 당첨되는 숫자 범위-1 (1부터 시작하므로 -1한 값) int selNum = 44; // 당첨되야되는 숫자 갯수 int winNum = 6; Scanner sc = new Scanner(System.in); int money = 100000; public static void main(String[] args) { HomeWork13 hw = new HomeWork13(); hw.process(); } public void ..
public class Card { int num; String type; public Card(int num, String type) { this.num = num; this.type = type; } @Override public String toString() { String num = this.num+""; if(this.num == 1) num ="A"; if(this.num == 11) num ="J"; if(this.num == 12) num ="Q"; if(this.num == 13) num ="K"; return type+num; } } import java.util.Arrays; import java.util.Random; public class Deck { public static v..