Commit 0bdce88d authored by Deokhyun Lee's avatar Deokhyun Lee

Methods already added in the main

parent ecba8f25
......@@ -9,6 +9,7 @@ import dto.MemberDto;
public class MainClass {
public static void main(String[] args) {
String name, email, major, password, changedPassword;
// 멤버 정보 DB 활용
MemberDaoImpl memberDao = new MemberDaoImpl();
// 파일에 있는 데이터를 읽어오기
......@@ -23,15 +24,29 @@ public class MainClass {
// 데이터 보기
System.out.println(memberDao.selectAll());
// 데이터 수정
System.out.println("1 로 회원가입; 2 로 로그인");
System.out.println("1 회원가입; 2 로그인; 3 비번 변경");
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
sc.nextLine();
if (num == 1){
System.out.print("이름, 전공, 이메일, 비번");
name = sc.nextLine();
major = sc.nextLine();
email = sc.nextLine();
password = sc.nextLine();
memberDao.insertSignUpForm(name, major, email, password);
}else if (num == 2){
System.out.println("이메일, 비번 입력해주세요");
email = sc.nextLine();
password = sc.nextLine();
memberDao.logIn(email, password);
}else if (num == 3){
System.out.println("이메일, 현재 비번, 바꿀 비밀번호 순으로 입력해주세요");
email = sc.nextLine();
password = sc.nextLine();
changedPassword = sc.nextLine();
memberDao.updateUserInfo(email, password, changedPassword);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment