Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package dogShowUI;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- import utility.ScannerWrapper;
- public class ApplicationIU {
- public static Connection conn;
- static {
- try {
- Class.forName("com.mysql.jdbc.Driver");
- conn = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/dogshow", "root", "LaRochelle007");
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- public static void mainManu () {
- System.out.println("Dog Show / Main Menu:");
- System.out.println("(1) Owners");
- System.out.println("(2) Dogs");
- System.out.println("Insert 0 for exit.");
- }
- public static void main (String [] args) {
- int option = -1;
- while (option != 0) {
- mainManu();
- System.out.println("Insert your option: ");
- option = ScannerWrapper.inputNumber();
- switch (option) {
- case 1:
- OwnerUI.ownerManual();
- break;
- case 2:
- DogUI.godManual();
- break;
- default:
- System.out.println("Wrong input!");
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement