Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Timetable-Program/main.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (18 sloc)
991 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "functions.h" | |
int main() { // Main function to introduce data | |
timetable_db sqldb; | |
sqldb.create_table(); // Calling function to create table | |
sqldb.insert_student("1", "Joao"); // Inserting new Student data (ID, Name) | |
sqldb.insert_student("2", "Kylian"); | |
sqldb.insert_lecturer("1", "Cristiano"); // Inserting new Lecturer data (ID, Name) | |
sqldb.insert_lecturer("2", "Lionel"); | |
sqldb.insert_module("1", "Introdution to Work Ethic"); // Inserting new Module data (ID, Name) | |
sqldb.insert_module("2", "Dribble Engineering"); | |
sqldb.insert_room("1", "Eusebio"); // Inserting new Room data (ID, Name) | |
sqldb.insert_room("2", "Maradona"); | |
sqldb.insert_class("1", "8", "1", "1", "1", "1"); // Inserting new Class data (ID, Time, Room ID, Lecturer ID, Student ID, Module ID) | |
sqldb.insert_class("2", "5", "2", "2", "2", "2"); | |
sqldb.show_db(); // Function to print Output | |
sqldb.close_db(); // Closing DB | |
return 0; | |
} |