"...git@git.cs.usask.ca:esc568/cmpt-370-group-project.git" did not exist on "989a6306843f585f6240bf19fac9e8d21e53c200"
Newer
Older
import java.sql.*;
protected Staff staff;
protected Schedule schedule;
private Connection dbConnection;
public Model(){
connectDataBase();
this.staff = new Staff(dbConnection);
this.schedule = new Schedule(dbConnection);
}
protected String connectDataBase(){
try {
dbConnection = DriverManager.getConnection("jdbc:mysql://localhost:3306/ScheduleApp", "root", "password");
} catch (Exception e) {
System.out.println(e.fillInStackTrace());
return "Couldn't connect to database.";
}
return "Successfully connected to database.";
}
public static void main(String[] args) {
Model model = new Model();
/* Testing stuff that should be cleaned up for the alpha
String s = model.staff.getEmployees();
System.out.println();
*/
}