diff --git a/Car.java b/Car.java
deleted file mode 100644
index 411f370..0000000
--- a/Car.java
+++ /dev/null
@@ -1,19 +0,0 @@
-class Car {
- String color;
- String gearType;
- int cntDoor;
- Car() {}
- Car(String color, String gearType, int cntDoor) {
- this.color = color;
- this.gearType = gearType;
- this.cntDoor = cntDoor;
- }
- public static void main(String[] args){
- Car c1 = new Car();
- c1.color = "black";
- c1.gearType = "manual";
- c1.cntDoor = 4;
-
- Car c2 = new Car("red", "auto", 4);
- }
-}
\ No newline at end of file
diff --git a/CarShop/.idea/.gitignore b/CarShop/.idea/.gitignore
new file mode 100644
index 0000000..73f69e0
--- /dev/null
+++ b/CarShop/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/CarShop/.idea/dataSources.xml b/CarShop/.idea/dataSources.xml
new file mode 100644
index 0000000..1dad19d
--- /dev/null
+++ b/CarShop/.idea/dataSources.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ oracle
+ true
+ false
+ oracle.jdbc.OracleDriver
+ jdbc:oracle:thin:@localhost:1521:XE
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/libraries/ojdbc8.xml b/CarShop/.idea/libraries/ojdbc8.xml
new file mode 100644
index 0000000..75f1124
--- /dev/null
+++ b/CarShop/.idea/libraries/ojdbc8.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/markdown-navigator-enh.xml b/CarShop/.idea/markdown-navigator-enh.xml
new file mode 100644
index 0000000..a8fcc84
--- /dev/null
+++ b/CarShop/.idea/markdown-navigator-enh.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/markdown-navigator.xml b/CarShop/.idea/markdown-navigator.xml
new file mode 100644
index 0000000..a2fc086
--- /dev/null
+++ b/CarShop/.idea/markdown-navigator.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/misc.xml b/CarShop/.idea/misc.xml
new file mode 100644
index 0000000..0548357
--- /dev/null
+++ b/CarShop/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/modules.xml b/CarShop/.idea/modules.xml
new file mode 100644
index 0000000..d1a9a6b
--- /dev/null
+++ b/CarShop/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/uiDesigner.xml b/CarShop/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/CarShop/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/.idea/vcs.xml b/CarShop/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/CarShop/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/CarShop.iml b/CarShop/CarShop.iml
new file mode 100644
index 0000000..6f7c39f
--- /dev/null
+++ b/CarShop/CarShop.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/out/production/CarShop/common/JDBCTemplate.class b/CarShop/out/production/CarShop/common/JDBCTemplate.class
new file mode 100644
index 0000000..fd90992
Binary files /dev/null and b/CarShop/out/production/CarShop/common/JDBCTemplate.class differ
diff --git a/CarShop/out/production/CarShop/controller/CarShopController.class b/CarShop/out/production/CarShop/controller/CarShopController.class
new file mode 100644
index 0000000..d58bdc8
Binary files /dev/null and b/CarShop/out/production/CarShop/controller/CarShopController.class differ
diff --git a/CarShop/out/production/CarShop/model/dao/CarShopDAO.class b/CarShop/out/production/CarShop/model/dao/CarShopDAO.class
new file mode 100644
index 0000000..4445d59
Binary files /dev/null and b/CarShop/out/production/CarShop/model/dao/CarShopDAO.class differ
diff --git a/CarShop/out/production/CarShop/model/service/CarShopService.class b/CarShop/out/production/CarShop/model/service/CarShopService.class
new file mode 100644
index 0000000..225e5c1
Binary files /dev/null and b/CarShop/out/production/CarShop/model/service/CarShopService.class differ
diff --git a/CarShop/out/production/CarShop/model/vo/CarShop.class b/CarShop/out/production/CarShop/model/vo/CarShop.class
new file mode 100644
index 0000000..541e059
Binary files /dev/null and b/CarShop/out/production/CarShop/model/vo/CarShop.class differ
diff --git a/CarShop/out/production/CarShop/run/Run.class b/CarShop/out/production/CarShop/run/Run.class
new file mode 100644
index 0000000..a1811a6
Binary files /dev/null and b/CarShop/out/production/CarShop/run/Run.class differ
diff --git a/CarShop/out/production/CarShop/view/CarShopView.class b/CarShop/out/production/CarShop/view/CarShopView.class
new file mode 100644
index 0000000..a55b678
Binary files /dev/null and b/CarShop/out/production/CarShop/view/CarShopView.class differ
diff --git a/CarShop/resource/driver.properties b/CarShop/resource/driver.properties
new file mode 100644
index 0000000..185437a
--- /dev/null
+++ b/CarShop/resource/driver.properties
@@ -0,0 +1,5 @@
+!-- DB Á¤º¸ »ý¼º
+driver=oracle.jdbc.driver.OracleDriver
+url=jdbc:oracle:thin:@localhost:1521/xepdb1
+userID=CAR
+passwd=admin
\ No newline at end of file
diff --git a/CarShop/resource/query.xml b/CarShop/resource/query.xml
new file mode 100644
index 0000000..668dde1
--- /dev/null
+++ b/CarShop/resource/query.xml
@@ -0,0 +1,28 @@
+
+
+
+
+ SELECT * FROM CONTRACT;
+
+
+ insert into CONTRACT values (
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ ?,
+ );
+
+
+
+
+
\ No newline at end of file
diff --git a/CarShop/src/common/JDBCTemplate.java b/CarShop/src/common/JDBCTemplate.java
new file mode 100644
index 0000000..f1d78bc
--- /dev/null
+++ b/CarShop/src/common/JDBCTemplate.java
@@ -0,0 +1,75 @@
+package common;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.sql.*;
+import java.util.Properties;
+
+/*
+ * Driver ìƒì„±
+ * Connection ìƒì„±
+ * close() ìƒì„±
+ */
+public class JDBCTemplate {
+
+ public static Connection getCon() throws IOException, ClassNotFoundException, SQLException {
+ Connection con = null;
+
+ Properties pro = new Properties();
+
+ try {
+ pro.load(new FileInputStream("resource/driver.properties"));
+ Class.forName(pro.getProperty("driver"));
+ con = DriverManager.getConnection(pro.getProperty("url"), pro.getProperty("userID"), pro.getProperty("passwd"));
+ } catch (IOException | ClassNotFoundException | SQLException e) {
+ e.printStackTrace();
+ }
+
+ return con;
+ }
+
+ public static void close(Connection con) throws SQLException {
+ try {
+ if (con != null && !con.isClosed())
+ con.close();
+ }catch (SQLException throwables) {
+ throwables.printStackTrace();
+ }
+ }
+
+ public static void close(Statement st) throws SQLException {
+ try {
+ if (st != null && !st.isClosed())
+ st.close();
+ }catch (SQLException throwables) {
+ throwables.printStackTrace();
+ }
+ }
+
+ public static void close(ResultSet rs) {
+ try {
+ if (rs != null && !rs.isClosed())
+ rs.close();
+ }catch (SQLException throwables) {
+ throwables.printStackTrace();
+ }
+ }
+
+ public static void commit(Connection con) {
+ try {
+ if (con != null && !con.isClosed())
+ con.commit();
+ }catch (SQLException throwables) {
+ throwables.printStackTrace();
+ }
+ }
+
+ public static void rollback(Connection con) {
+ try {
+ if (con != null && !con.isClosed())
+ con.rollback();
+ }catch (SQLException throwables) {
+ throwables.printStackTrace();
+ }
+ }
+}
diff --git a/CarShop/src/controller/CarShopController.java b/CarShop/src/controller/CarShopController.java
new file mode 100644
index 0000000..186cca9
--- /dev/null
+++ b/CarShop/src/controller/CarShopController.java
@@ -0,0 +1,25 @@
+package controller;
+
+import model.service.CarShopService;
+import model.vo.CarShop;
+import view.CarShopView;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.ArrayList;
+
+public class CarShopController {
+ public void selectList() throws SQLException, IOException, ClassNotFoundException {
+ ArrayList list = new CarShopService().selectList();
+
+ if(list.isEmpty())
+ new CarShopView().displayNoData("ì¡°íšŒëœ ê²°ê³¼ ì—†ìŒ");
+ else
+ new CarShopView().displayCarList(list);
+ }
+
+ public void insert() throws SQLException, IOException, ClassNotFoundException {
+ ArrayList inputInsertlist = new CarShopView().insert();
+ new CarShopService().insert(inputInsertlist);
+ }
+}
diff --git a/CarShop/src/model/dao/CarShopDAO.java b/CarShop/src/model/dao/CarShopDAO.java
new file mode 100644
index 0000000..bb47237
--- /dev/null
+++ b/CarShop/src/model/dao/CarShopDAO.java
@@ -0,0 +1,104 @@
+package model.dao;
+
+import model.vo.CarShop;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import static common.JDBCTemplate.*;
+
+public class CarShopDAO {
+
+ private Properties pro = new Properties();
+
+ public CarShopDAO() throws IOException {
+ // xmlíŒŒì¼ ë¶ˆëŸ¬ì˜¤ê¸°
+ pro.loadFromXML(new FileInputStream("resource/query.xml"));
+ }
+ public ArrayList selectList(Connection con) throws SQLException, IOException {
+ ArrayList list = new ArrayList<>();
+ PreparedStatement st = null;
+ ResultSet rs = null;
+
+ String sql = pro.getProperty("selectList");
+ try {
+ st = con.prepareStatement(sql);
+ rs = st.executeQuery();
+
+ while(rs.next()) {
+ list.add(new CarShop(rs.getString("USERNAME"),
+ rs.getString("USERNAME"),
+ rs.getString("USERSSN"),
+ rs.getString("USERPHONE"),
+ rs.getString("USERADDRESS"),
+ rs.getString("USEREMAIL"),
+ rs.getString("BRAND"),
+ rs.getString("MODEL"),
+ rs.getString("TYPE"),
+ rs.getString("GEARTYPE"),
+ rs.getString("COLOR"),
+ rs.getInt("DOOR"),
+ rs.getInt("CC"),
+ rs.getInt("FUEL"),
+ rs.getInt("PRICE")
+ ));
+ }
+ }catch (SQLException throwables){
+ throwables.printStackTrace();
+ } finally {
+ close(rs);
+ close(st);
+ }
+
+ return list;
+ }
+
+ public void insert(Connection con, ArrayList list) {
+ String userName = list.get(0).toString();
+ String userSsn = list.get(1).toString();
+ String userPhone = list.get(2).toString();
+ String userAddr = list.get(3).toString();
+ String userEmail = list.get(4).toString();
+ String brand = list.get(5).toString();
+ String model = list.get(6).toString();
+ String type = list.get(7).toString();
+ String gearType = list.get(8).toString();
+ String color = list.get(9).toString();
+ int door = Integer.parseInt(list.get(10).toString());
+ int cc = Integer.parseInt(list.get(11).toString());
+ int fuel = Integer.parseInt(list.get(12).toString());
+ int price = Integer.parseInt(list.get(13).toString());
+
+ PreparedStatement st = null;
+ ResultSet rs = null;
+
+ String sql = pro.getProperty("insert");
+ try {
+ st = con.prepareStatement(sql);
+ st.setString(1,userName);
+ st.setString(2,userSsn);
+ st.setString(3,userPhone);
+ st.setString(4,userAddr);
+ st.setString(5,userEmail);
+ st.setString(6,brand);
+ st.setString(7,model);
+ st.setString(8,type);
+ st.setString(9,gearType);
+ st.setString(10,color);
+ st.setInt(11,door);
+ st.setInt(12,cc);
+ st.setInt(13,fuel);
+ st.setInt(14,price);
+
+ } catch (SQLException throwables) {
+ throwables.printStackTrace();
+ }
+
+ }
+}
diff --git a/CarShop/src/model/service/CarShopService.java b/CarShop/src/model/service/CarShopService.java
new file mode 100644
index 0000000..893341e
--- /dev/null
+++ b/CarShop/src/model/service/CarShopService.java
@@ -0,0 +1,31 @@
+package model.service;
+
+import model.dao.CarShopDAO;
+import model.vo.CarShop;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+import static common.JDBCTemplate.*;
+
+public class CarShopService {
+
+ public ArrayList selectList() throws SQLException, IOException, ClassNotFoundException {
+ Connection con = getCon();
+
+ ArrayList list = new CarShopDAO().selectList(con);
+
+ close(con);
+ return list;
+ }
+
+ public void insert(ArrayList list) throws IOException, SQLException, ClassNotFoundException {
+ Connection con = getCon();
+
+ new CarShopDAO().insert(con, list);
+
+ close(con);
+ }
+}
diff --git a/CarShop/src/model/vo/CarShop.java b/CarShop/src/model/vo/CarShop.java
new file mode 100644
index 0000000..5d490d1
--- /dev/null
+++ b/CarShop/src/model/vo/CarShop.java
@@ -0,0 +1,168 @@
+package model.vo;
+
+public class CarShop {
+ private String userName;
+ private String userSsn;
+ private String userPhone;
+ private String userAddress;
+ private String userEmail;
+
+ private String brand;
+ private String model;
+ private String type;
+ private String gearType;
+ private String color;
+ private int door;
+ private int cc;
+ private int fuel;
+ private int price;
+
+ public CarShop(String username, String string, String userssn, String userphone, String useraddress, String useremail, String brand, String model, String type, String geartype, String color, int door, int cc, int fuel, int price) {}
+ public CarShop(String userName, String userSsn, String userPhone, String userAddress, String userEmail, String brand, String model, String type, String gearType, String color, int door, int cc, int fuel, int price) {
+ this.userName = userName;
+ this.userSsn = userSsn;
+ this.userPhone = userPhone;
+ this.userAddress = userAddress;
+ this.userEmail = userEmail;
+ this.brand = brand;
+ this.model = model;
+ this.type = type;
+ this.gearType = gearType;
+ this.color = color;
+ this.door = door;
+ this.cc = cc;
+ this.fuel = fuel;
+ this.price = price;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getUserSsn() {
+ return userSsn;
+ }
+
+ public void setUserSsn(String userSsn) {
+ this.userSsn = userSsn;
+ }
+
+ public String getUserPhone() {
+ return userPhone;
+ }
+
+ public void setUserPhone(String userPhone) {
+ this.userPhone = userPhone;
+ }
+
+ public String getUserAddress() {
+ return userAddress;
+ }
+
+ public void setUserAddress(String userAddress) {
+ this.userAddress = userAddress;
+ }
+
+ public String getUserEmail() {
+ return userEmail;
+ }
+
+ public void setUserEmail(String userEmail) {
+ this.userEmail = userEmail;
+ }
+
+ public String getBrand() {
+ return brand;
+ }
+
+ public void setBrand(String brand) {
+ this.brand = brand;
+ }
+
+ public String getModel() {
+ return model;
+ }
+
+ public void setModel(String model) {
+ this.model = model;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getGearType() {
+ return gearType;
+ }
+
+ public void setGearType(String gearType) {
+ this.gearType = gearType;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+
+ public int getDoor() {
+ return door;
+ }
+
+ public void setDoor(int door) {
+ this.door = door;
+ }
+
+ public int getCc() {
+ return cc;
+ }
+
+ public void setCc(int cc) {
+ this.cc = cc;
+ }
+
+ public int getFuel() {
+ return fuel;
+ }
+
+ public void setFuel(int fuel) {
+ this.fuel = fuel;
+ }
+
+ public int getPrice() {
+ return price;
+ }
+
+ public void setPrice(int price) {
+ this.price = price;
+ }
+
+ @Override
+ public String toString() {
+ return "userName: " + userName +
+ ", userSsn: " + userSsn +
+ ", userPhone: " + userPhone +
+ ", userAddress: " + userAddress +
+ ", userEmail: " + userEmail +
+ ", brand: " + brand +
+ ", model: " + model +
+ ", type: " + type +
+ ", gearType: " + gearType +
+ ", color: " + color +
+ ", door: " + door +
+ ", cc: " + cc +
+ ", fuel: " + fuel +
+ ", price: " + price;
+ }
+}
+
diff --git a/CarShop/src/run/Run.java b/CarShop/src/run/Run.java
new file mode 100644
index 0000000..7bab169
--- /dev/null
+++ b/CarShop/src/run/Run.java
@@ -0,0 +1,12 @@
+package run;
+
+import view.CarShopView;
+
+import java.io.IOException;
+import java.sql.SQLException;
+
+public class Run {
+ public static void main(String[] args) throws SQLException, IOException, ClassNotFoundException {
+ new CarShopView().mainMenu();
+ }
+}
diff --git a/CarShop/src/view/CarShopView.java b/CarShop/src/view/CarShopView.java
new file mode 100644
index 0000000..8d0e260
--- /dev/null
+++ b/CarShop/src/view/CarShopView.java
@@ -0,0 +1,122 @@
+package view;
+
+import controller.CarShopController;
+import model.vo.CarShop;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Scanner;
+
+public class CarShopView {
+
+ private Scanner sc;
+ private CarShopController csc;
+
+ public CarShopView() {
+ sc = new Scanner(System.in);
+ csc = new CarShopController();
+ }
+
+ public void mainMenu() throws SQLException, IOException, ClassNotFoundException {
+ printMenu();
+ EXIT:
+ while(true) {
+ switch (inputMenu()) {
+ case 1 : //ì „ì²´ 계약서 보기
+ csc.selectList();
+ break;
+ case 2 : //계약서 작성
+ csc.insert();
+ break;
+ case 3 : // 계약서 ìˆ˜ì •
+ break;
+ case 4 : //계약서 ì‚ì œ
+ break;
+ case 5 :
+ System.out.println("BYE");
+ break EXIT;
+ default:
+ System.out.println("다시 ìž…ë ¥");
+ break;
+ }
+ }
+ }
+
+ public ArrayList insert() {
+ ArrayList list = new ArrayList<>();
+
+ System.out.println("===== 계약서 작성 부분 입니다. =====");
+ System.out.print("성함 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("주민번호 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("í•¸ë“œí° ë²ˆí˜¸ >>");
+ list.add(sc.nextLine());
+
+ System.out.print("주소 >>");
+ list.add(sc.nextLine());
+
+ System.out.println("필수값 아닙니다. enter로 ë„˜ì–´ê°€ì…”ë„ ë©ë‹ˆë‹¤.");
+ System.out.print("Email >> ");
+ list.add(sc.nextLine());
+
+ System.out.print("차 브랜드 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("모ë¸ëª… >>");
+ list.add(sc.nextLine());
+
+ System.out.print("타입 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("기어 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("ìƒ‰ìƒ >>");
+ list.add(sc.nextLine());
+
+ System.out.print("문 개수 >>");
+ String door_ = sc.nextLine();
+ list.add(sc.nextLine());
+
+ System.out.print("배기량 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("연비 >>");
+ list.add(sc.nextLine());
+
+ System.out.print("가격 >>");
+ list.add(sc.nextLine());
+ return list;
+ }
+ public void printMenu() {
+ System.out.println("====== 차량 계약서 ======");
+ System.out.println("1. 계약서 ì „ì²´ 조회");
+ System.out.println("2. 계약서 작성");
+ System.out.println("3. 계약서 ìˆ˜ì •");
+ System.out.println("4. 계약서 ì‚ì œ");
+ System.out.println("5. 종료");
+ }
+
+ public int inputMenu() {
+ System.out.print(" >> ");
+ String menu_ = sc.nextLine();
+ int menu = Integer.parseInt(menu_);
+ return menu;
+ }
+
+ //ì‘답 화면
+
+ public void displayNoData(String message) {
+ System.out.println(message);
+ }
+
+ public void displayCarList(ArrayList list) {
+ for (CarShop l: list) {
+ System.out.println(l);
+ }
+ }
+}
diff --git a/Project/.idea/.gitignore b/Project/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/Project/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/Project/.idea/aws.xml b/Project/.idea/aws.xml
new file mode 100644
index 0000000..b63b642
--- /dev/null
+++ b/Project/.idea/aws.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/codeStyles/Project.xml b/Project/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..80eafa9
--- /dev/null
+++ b/Project/.idea/codeStyles/Project.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/codeStyles/codeStyleConfig.xml b/Project/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/Project/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/markdown-navigator-enh.xml b/Project/.idea/markdown-navigator-enh.xml
new file mode 100644
index 0000000..a8fcc84
--- /dev/null
+++ b/Project/.idea/markdown-navigator-enh.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/markdown-navigator.xml b/Project/.idea/markdown-navigator.xml
new file mode 100644
index 0000000..57b84e5
--- /dev/null
+++ b/Project/.idea/markdown-navigator.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/misc.xml b/Project/.idea/misc.xml
new file mode 100644
index 0000000..0548357
--- /dev/null
+++ b/Project/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/modules.xml b/Project/.idea/modules.xml
new file mode 100644
index 0000000..4d73229
--- /dev/null
+++ b/Project/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/uiDesigner.xml b/Project/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/Project/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/.idea/vcs.xml b/Project/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/Project/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/JavaStudy.iml b/Project/JavaStudy.iml
new file mode 100644
index 0000000..c90834f
--- /dev/null
+++ b/Project/JavaStudy.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Project/out/production/JavaStudy/model/dto/Agreement.class b/Project/out/production/JavaStudy/model/dto/Agreement.class
new file mode 100644
index 0000000..b175328
Binary files /dev/null and b/Project/out/production/JavaStudy/model/dto/Agreement.class differ
diff --git a/Project/out/production/JavaStudy/model/dto/Option.class b/Project/out/production/JavaStudy/model/dto/Option.class
new file mode 100644
index 0000000..dbddf99
Binary files /dev/null and b/Project/out/production/JavaStudy/model/dto/Option.class differ
diff --git a/Project/out/production/JavaStudy/model/dto/TypesOfVehicles.class b/Project/out/production/JavaStudy/model/dto/TypesOfVehicles.class
new file mode 100644
index 0000000..ef079a4
Binary files /dev/null and b/Project/out/production/JavaStudy/model/dto/TypesOfVehicles.class differ
diff --git a/Project/out/production/JavaStudy/model/vo/Menu.class b/Project/out/production/JavaStudy/model/vo/Menu.class
new file mode 100644
index 0000000..67ad8ab
Binary files /dev/null and b/Project/out/production/JavaStudy/model/vo/Menu.class differ
diff --git a/Project/out/production/JavaStudy/run/Car.class b/Project/out/production/JavaStudy/run/Car.class
new file mode 100644
index 0000000..1965ad2
Binary files /dev/null and b/Project/out/production/JavaStudy/run/Car.class differ
diff --git a/Project/src/model/dto/Agreement.java b/Project/src/model/dto/Agreement.java
new file mode 100644
index 0000000..e84fa43
--- /dev/null
+++ b/Project/src/model/dto/Agreement.java
@@ -0,0 +1,26 @@
+package model.dto;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+
+public class Agreement {
+
+ LocalDateTime date;
+ String vehicles;
+ String options;
+
+ public void setAgreement(LocalDateTime date, String vehicles, String options) {
+ this.date = date;
+ this.vehicles = vehicles;
+ this.options = options;
+ }
+
+ public LocalDateTime getNowTime() {
+ LocalDateTime date = LocalDateTime.now();
+ return date;
+ }
+
+ public String getAgreement(){
+ return "[ 계약ì¼ì‹œ: " + date + ", 차종: " + vehicles + ", 옵션: " + options + "]";
+ }
+}
diff --git a/Project/src/model/dto/Option.java b/Project/src/model/dto/Option.java
new file mode 100644
index 0000000..c167cea
--- /dev/null
+++ b/Project/src/model/dto/Option.java
@@ -0,0 +1,48 @@
+package model.dto;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class Option {
+ private static ArrayList colorLists = new ArrayList (Arrays.asList("red", "blue", "black"));
+ private static String[] gearType = {"auto", "stick"};
+ private static int[] cntDoor = {1, 2, 3, 4, 5, 6, 7, 8};
+
+ public void setOptionList(String color) {
+ colorLists.add(color);
+ }
+
+ public static void printOptionList() {
+
+ System.out.println("--------------");
+ System.out.println("| color List |");
+ System.out.println("--------------");
+ for (int i = 0; i < colorLists.size(); i++) {
+ if (i == colorLists.size() -1)
+ System.out.println(colorLists.get(i) + "\n");
+ else
+ System.out.print(colorLists.get(i) + ", ");
+ }
+
+ System.out.println("-----------------");
+ System.out.println("| gearType List |");
+ System.out.println("-----------------");
+ for (int i = 0; i < gearType.length; i++) {
+ if (i == gearType.length -1)
+ System.out.println(gearType[i] + "\n");
+ else
+ System.out.print(gearType[i] + ", ");
+ }
+
+ System.out.println("----------------");
+ System.out.println("| cntDoor List |");
+ System.out.println("----------------");
+ for (int i = 0; i < cntDoor.length; i++) {
+ if (i == cntDoor.length -1)
+ System.out.println(cntDoor[i] + "\n");
+ else
+ System.out.print(cntDoor[i] + ", ");
+ }
+
+ }
+}
diff --git a/Project/src/model/dto/TypesOfVehicles.java b/Project/src/model/dto/TypesOfVehicles.java
new file mode 100644
index 0000000..9b1f834
--- /dev/null
+++ b/Project/src/model/dto/TypesOfVehicles.java
@@ -0,0 +1,25 @@
+package model.dto;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class TypesOfVehicles {
+ private static ArrayList vehicleLists = new ArrayList(Arrays.asList("아반테", "소나타", "ê·¸ëžœì ¸"));
+
+ public void setOptionList(String vehicle) {
+ vehicleLists.add(vehicle);
+ }
+
+ public static void printTypesOfVehicles() {
+ System.out.println("------------");
+ System.out.println("| 차종 List |");
+ System.out.println("------------");
+ for (int i = 0; i < vehicleLists.size(); i++) {
+ if (i == vehicleLists.size() -1)
+ System.out.print(vehicleLists.get(i) + "\n");
+ else
+ System.out.print(vehicleLists.get(i) + ", ");
+ }
+
+ }
+}
diff --git a/Project/src/model/vo/Menu.java b/Project/src/model/vo/Menu.java
new file mode 100644
index 0000000..da63471
--- /dev/null
+++ b/Project/src/model/vo/Menu.java
@@ -0,0 +1,58 @@
+package model.vo;
+
+import model.dto.Option;
+import model.dto.TypesOfVehicles;
+
+import java.util.Scanner;
+
+public class Menu {
+ static boolean run = true;
+ public void MainMenu() {
+
+ while(run) {
+ Scanner sc = new Scanner(System.in);
+ System.out.println("-------------");
+ System.out.println("| Main Menu |");
+ System.out.println("-------------");
+ System.out.println("1. 계약서 작성");
+ System.out.println("2. 차종 ë° ì˜µì…˜ 확ì¸");
+ System.out.println("3. QUIT");
+ System.out.print(">> ");
+ a(sc.nextInt());
+ }
+ }
+
+ private void a (int num) {
+ switch (num) {
+ case 1:
+ writeAgreement();
+ break;
+ case 2:
+ Option.printOptionList();
+ TypesOfVehicles.printTypesOfVehicles();
+ break;
+ case 3:
+ System.out.println("bye");
+ run = false;
+ break;
+ default:
+ System.out.println("숫ìžë¥¼ ìž˜ëª»ìž…ë ¥í•˜ì…¨ìŠµë‹ˆë‹¤.");
+ System.out.println("1 ~ 4 사ì´ì˜ 숫ìžë¥¼ ìž…ë ¥í•´ì£¼ì„¸ìš”.");
+ break;
+ }
+ }
+
+ private void printTypesOfVehicles() {
+
+ }
+
+ private void printOption() {
+
+ }
+
+ private void writeAgreement() {
+
+ }
+
+
+}
diff --git a/Project/src/run/Car.java b/Project/src/run/Car.java
new file mode 100644
index 0000000..c8a26aa
--- /dev/null
+++ b/Project/src/run/Car.java
@@ -0,0 +1,11 @@
+package run;
+
+import model.vo.Menu;
+
+public class Car {
+ public static void main(String[] args) {
+ Menu menu = new Menu();
+
+ menu.MainMenu();
+ }
+}
diff --git a/doc/ch06.pptx b/doc/ch06.pptx
new file mode 100644
index 0000000..3a2f8dc
Binary files /dev/null and b/doc/ch06.pptx differ