Skip to content

A Learning Management System where users can take part in quizzes and view their performances

Notifications You must be signed in to change notification settings

coder-guy-50/learning-managment-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

learning-managment-system

READ THIS BEFORE USING THE PROJECT

MAKE THE FOLLOWING SQL DATABASE AND LINK IT WITH THE PROJECT:

ALSO MAKE SURE TO ADD THE DATABASE NAME, USER NAME AND PASSWORD IN THE ControllerMethods.java AND ADD THE DRIVER TO THE PROJECT

NOTE: (THIS CODE IS FOR MYSQL)

CREATE DATABASE LMS; USE LMS; CREATE TABLE Users( Id INT NOT NULL AUTO_INCREMENT, FirstName VARCHAR(50), LastName VARCHAR(50), Email VARCHAR(50), Password VARCHAR(50), SignUpDate datetime, PRIMARY KEY (Id) ) AUTO_INCREMENT = 1001; CREATE TABLE Quizzes( Quizz_Id INT NOT NULL AUTO_INCREMENT, Quiz_Name VARCHAR(50), Subject VARCHAR(50), Total_Questions INT, PRIMARY KEY (Quizz_Id) ) AUTO_INCREMENT = 1; CREATE TABLE Attempts( Attempt_number INT NOT NULL AUTO_INCREMENT, Quizz_id INT, User_id INT, total_questions INT, correct_answers INT, FOREIGN KEY (Quizz_id) REFERENCES Quizzes(Quizz_Id), FOREIGN KEY (User_id) REFERENCES Users(Id), PRIMARY KEY (Attempt_number) ) AUTO_INCREMENT = 1; ALTER TABLE Attempts ADD COLUMN result_percentage DECIMAL(5, 2); CREATE TABLE TheRomanEmpire( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO TheRomanEmpire VALUES('Who was the legendary founder of Rome?', 'Julius Caesar', 'Augustus', 'Romulus', 'Constantine', 'Romulus'); INSERT INTO TheRomanEmpire VALUES('What was the official language of the Roman Empire?', 'Greek', 'Latin', 'Italian', 'Spanish', 'Latin'); INSERT INTO TheRomanEmpire VALUES('Which city was considered the capital of the Roman Empire?', 'Rome', 'Athens', 'Constantinople', 'Alexendria', 'Rome'); INSERT INTO TheRomanEmpire VALUES('Who was the first Roman Emperor?', 'Augustus', 'Julius Caesar', 'Nero', 'Trajan', 'Augustus'); INSERT INTO TheRomanEmpire VALUES('What event marked the fall of the Western Roman Empire in 476 AD?', 'Battle of Cannae', 'Sack of Rome', 'Punic Wars', 'Fall of Constantinople', 'Sack of Rome'); INSERT INTO TheRomanEmpire VALUES('Which Roman emperor famously declared himself a god?', 'Nero', 'Augustus', 'Caligula', 'Marcus Aurelius', 'Caligula'); INSERT INTO TheRomanEmpire VALUES('Who were the Praetorian Guard in ancient Rome?', 'Senators', 'Slaves', 'Elite soldiers and bodyguards', 'Merchants', 'Elite soldiers and bodyguards'); INSERT INTO TheRomanEmpire VALUES('What architectural structure symbolizes ancient Roman engineering prowess?', 'Colosseum', 'Parthenon', 'Pantheon', 'Roman Forum', 'Colosseum'); INSERT INTO TheRomanEmpire VALUES('Which ancient city was a rival to Rome during the Punic Wars?', 'Athens', 'Carthage', 'Sparta', 'Alexandria', 'Carthage'); INSERT INTO TheRomanEmpire VALUES('Who wrote the famous work "The Twelve Caesars," chronicling the lives of Roman emperors?', 'Virgil', 'Cicero', 'Tacitus', 'Suetonius', 'Suetonius'); CREATE TABLE Mountains( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO Mountains VALUES ('What is the highest mountain in the world?', 'Mount Everest', 'K2', 'Kangchenjunga', 'Lhotse', 'Mount Everest'); INSERT INTO Mountains VALUES ('In which mountain range is Mount McKinley located?', 'Rocky Mountains', 'Andes', 'Himalayas', 'Alaska Range', 'Alaska Range'); INSERT INTO Mountains VALUES ('Which mountain is known as the Matterhorn?', 'Mont Blanc', 'Weisshorn', 'Zinalrothorn', 'Dent dHérens', 'Weisshorn'); INSERT INTO Mountains VALUES ('Which mountain is often referred to as the "Roof of Africa"?', 'Mount Elbrus', 'Mount Kenya', 'Kilimanjaro', 'Simien Mountains', 'Kilimanjaro'); INSERT INTO Mountains VALUES ('What is the highest peak in North America?', 'Denali', 'Mount Logan', 'Pico de Orizaba', 'Mount Saint Elias', 'Denali'); INSERT INTO Mountains VALUES ('Which mountain range separates Europe and Asia?', 'Ural Mountains', 'Carpathian Mountains', 'Caucasus Mountains', 'Alps', 'Ural Mountains'); INSERT INTO Mountains VALUES ('Which of the following is a famous mountain in New Zealand?', 'Mount Cook', 'Mount Aspiring', 'Mount Tasman', 'Southern Alps', 'Mount Cook'); INSERT INTO Mountains VALUES ('Which mountain is considered sacred in Hinduism and Buddhism?', 'Kangchenjunga', 'Kailash', 'Annapurna', 'Makalu', 'Kailash'); INSERT INTO Mountains VALUES ('What is the highest mountain in South America?', 'Aconcagua', 'Huascarán', 'Monte Fitz Roy', 'Cerro Torre', 'Aconcagua'); INSERT INTO Mountains VALUES ('Which mountain range runs along the west coast of South America?', 'Rocky Mountains', 'Andes', 'Appalachian Mountains', 'Cascade Range', 'Andes'); CREATE TABLE ForceAndMotion( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO ForceAndMotion VALUES ('What is the fundamental force responsible for motion on Earth?', 'Gravity', 'Electromagnetism', 'Weak Nuclear Force', 'Strong Nuclear Force', 'Gravity'); INSERT INTO ForceAndMotion VALUES ('According to Newtons First Law, an object at rest tends to stay at rest unless acted upon by what?', 'Gravity', 'Friction', 'Net force', 'Air resistance', 'Net force'); INSERT INTO ForceAndMotion VALUES ('Which law of motion states that the force acting on an object is equal to the mass of that object times its acceleration?', 'Newtons First Law', 'Newtons Second Law', 'Newtons Third Law', 'Law of Universal Gravitation', 'Newtons Second Law'); INSERT INTO ForceAndMotion VALUES ('In which unit is force measured?', 'Watt', 'Newton', 'Joule', 'Pascal', 'Newton'); INSERT INTO ForceAndMotion VALUES ('What is the name of the force that opposes the relative motion or tendency of such motion of two surfaces in contact?', 'Tension', 'Friction', 'Normal force', 'Drag force', 'Friction'); CREATE TABLE Alkanes( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO Alkanes VALUES ('What is the general formula for alkanes?', 'CnH2n+2', 'CnH2n', 'CnHn', 'CnH2n-2', 'CnH2n+2'); INSERT INTO Alkanes VALUES ('How many carbon atoms are present in methane?', '1', '2', '3', '4', '1'); INSERT INTO Alkanes VALUES ('What is the common name for the alkane with four carbon atoms?', 'Methane', 'Ethane', 'Butane', 'Propane', 'Butane'); INSERT INTO Alkanes VALUES ('Which of the following is an example of a straight-chain alkane?', 'Isobutane', 'n-Pentane', 'Isohexane', 'n-Octane', 'n-Pentane'); INSERT INTO Alkanes VALUES ('How many hydrogen atoms are present in butane?', '6', '8', '10', '12', '10'); INSERT INTO Alkanes VALUES ('What is the IUPAC name for CH3-CH2-CH2-CH3?', 'Methane', 'Ethane', 'Propane', 'Butane', 'Butane'); INSERT INTO Alkanes VALUES ('In which state is methane found at room temperature?', 'Solid', 'Liquid', 'Gas', 'Plasma', 'Gas'); INSERT INTO Alkanes VALUES ('Which alkane is known as "marsh gas"?', 'Methane', 'Ethane', 'Propane', 'Butane', 'Methane'); INSERT INTO Alkanes VALUES ('How many carbon atoms are present in octane?', '6', '7', '8', '9', '8'); INSERT INTO Alkanes VALUES ('What is the boiling point of methane?', '-161.5°C', '-78.5°C', '-42.0°C', '0°C', '-161.5°C'); INSERT INTO Alkanes VALUES ('What is the IUPAC name for CH3-CH(CH3)-CH2-CH3?', 'Isobutane', 'n-Butane', 'Isohexane', 'n-Hexane', 'Isohexane'); INSERT INTO Alkanes VALUES ('Which alkane is commonly used as a fuel in portable stoves?', 'Methane', 'Propane', 'Butane', 'Pentane', 'Butane'); INSERT INTO Alkanes VALUES ('How many hydrogen atoms are present in propane?', '6', '8', '10', '12', '8'); INSERT INTO Alkanes VALUES ('Which alkane has a straight-chain isomer and a branched isomer?', 'Propane', 'Butane', 'Pentane', 'Hexane', 'Butane'); INSERT INTO Alkanes VALUES ('What is the IUPAC name for CH3-CH2-CH2-CH2-CH2-CH3?', 'Hexane', 'Heptane', 'Octane', 'Nonane', 'Hexane'); INSERT INTO Alkanes VALUES ('In which state is ethane found at room temperature?', 'Solid', 'Liquid', 'Gas', 'Plasma', 'Gas'); INSERT INTO Alkanes VALUES ('Which alkane has the highest boiling point?', 'Methane', 'Propane', 'Butane', 'Pentane', 'Pentane'); INSERT INTO Alkanes VALUES ('How many carbon atoms are present in decane?', '8', '9', '10', '11', '10'); INSERT INTO Alkanes VALUES ('What is the IUPAC name for CH3-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH2-CH3?', 'Decane', 'Nonane', 'Octane', 'Heptane', 'Decane'); INSERT INTO Alkanes VALUES ('Which alkane is a major component of natural gas?', 'Methane', 'Ethane', 'Propane', 'Butane', 'Methane'); CREATE TABLE AncientEgypt( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO AncientEgypt VALUES ('Which river was crucial to the development of Ancient Egypt?', 'Nile', 'Tigris', 'Euphrates', 'Indus', 'Nile'); INSERT INTO AncientEgypt VALUES ('Who was the last pharaoh of Ancient Egypt?', 'Cleopatra', 'Hatshepsut', 'Ramses II', 'Tutankhamun', 'Cleopatra'); INSERT INTO AncientEgypt VALUES ('What is the Great Sphinx of Giza believed to represent?', 'Pharaoh Khafre', 'Pharaoh Khufu', 'Pharaoh Amenhotep III', 'Horus', 'Pharaoh Khafre'); INSERT INTO AncientEgypt VALUES ('Which ancient writing system did the Egyptians use?', 'Cuneiform', 'Hieroglyphics', 'Alphabet', 'Pictographs', 'Hieroglyphics'); INSERT INTO AncientEgypt VALUES ('Who is known as the "Father of Medicine" and practiced medicine in Ancient Egypt?', 'Imhotep', 'Hippocrates', 'Galen', 'Herophilos', 'Imhotep'); INSERT INTO AncientEgypt VALUES ('Which queen ruled as a pharaoh during the New Kingdom?', 'Nefertiti', 'Hatshepsut', 'Cleopatra', 'Tiye', 'Hatshepsut'); INSERT INTO AncientEgypt VALUES ('What precious stone was highly valued by the ancient Egyptians?', 'Emerald', 'Ruby', 'Sapphire', 'Lapis Lazuli', 'Lapis Lazuli'); INSERT INTO AncientEgypt VALUES ('Which famous structure was built as a tomb for Pharaoh Khufu?', 'Luxor Temple', 'Valley of the Kings', 'Thebes', 'Great Pyramid of Giza', 'Great Pyramid of Giza'); INSERT INTO AncientEgypt VALUES ('What was the primary purpose of the Rosetta Stone?', 'Religious text', 'Trade agreement', 'Tax code', 'Deciphering hieroglyphics', 'Deciphering hieroglyphics'); INSERT INTO AncientEgypt VALUES ('Who is the ancient Egyptian god of the afterlife?', 'Ra', 'Anubis', 'Osiris', 'Horus', 'Osiris'); CREATE TABLE Verbs( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO Verbs VALUES ('What is the base form of the verb "swim"?', 'Swam', 'Swum', 'Swimming', 'Swims', 'Swim'); INSERT INTO Verbs VALUES ('Which verb tense is used to describe an action that will happen in the future?', 'Present tense', 'Past tense', 'Future tense', 'Perfect tense', 'Future tense'); INSERT INTO Verbs VALUES ('What is the past participle of the verb "eat"?', 'Ate', 'Eaten', 'Eating', 'Eats', 'Eaten'); INSERT INTO Verbs VALUES ('In the sentence "She has been singing," what type of verb is "singing"?', 'Transitive verb', 'Intransitive verb', 'Linking verb', 'Auxiliary verb', 'Linking verb'); INSERT INTO Verbs VALUES ('Which of the following is an example of an irregular verb?', 'Walk', 'Talk', 'Play', 'Go', 'Go'); INSERT INTO Verbs VALUES ('What is the gerund form of the verb "read"?', 'Reading', 'Reads', 'Read', 'Readed', 'Reading'); INSERT INTO Verbs VALUES ('In the sentence "They are studying for the exam," what type of verb is "studying"?', 'Action verb', 'Helping verb', 'Modal verb', 'Main verb', 'Main verb'); INSERT INTO Verbs VALUES ('Which verb tense is used to express an action that was ongoing in the past?', 'Simple past tense', 'Present perfect tense', 'Past perfect tense', 'Past continuous tense', 'Past continuous tense'); INSERT INTO Verbs VALUES ('What is the infinitive form of the verb "to be"?', 'Am', 'Is', 'Are', 'Be', 'Be'); INSERT INTO Verbs VALUES ('Which verb is used to indicate possibility or probability?', 'Can', 'Will', 'Must', 'Shall', 'Can'); CREATE TABLE Cell( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO Cell VALUES ('What is the basic structural and functional unit of all living organisms?', 'Tissue', 'Organ', 'Cell', 'Organism', 'Cell'); INSERT INTO Cell VALUES ('Which type of cells lack a nucleus?', 'Prokaryotic cells', 'Eukaryotic cells', 'Animal cells', 'Plant cells', 'Prokaryotic cells'); INSERT INTO Cell VALUES ('What is the function of the cell membrane?', 'Synthesizing proteins', 'Regulating the entry and exit of substances', 'Energy production', 'Storage of genetic material', 'Regulating the entry and exit of substances'); INSERT INTO Cell VALUES ('Which organelle is responsible for producing energy in the form of ATP?', 'Endoplasmic reticulum', 'Mitochondrion', 'Golgi apparatus', 'Nucleus', 'Mitochondrion'); INSERT INTO Cell VALUES ('What is the liquid-filled space inside a cell that contains organelles?', 'Nucleus', 'Cytoplasm', 'Cell membrane', 'Cell wall', 'Cytoplasm'); INSERT INTO Cell VALUES ('Which organelle is responsible for protein synthesis?', 'Nucleus', 'Ribosome', 'Mitochondrion', 'Endoplasmic reticulum', 'Ribosome'); INSERT INTO Cell VALUES ('In plant cells, what provides rigidity and support to the cell?', 'Nucleus', 'Cell membrane', 'Cell wall', 'Vacuole', 'Cell wall'); INSERT INTO Cell VALUES ('Which organelle is involved in the breakdown of cellular waste?', 'Golgi apparatus', 'Lysosome', 'Endoplasmic reticulum', 'Vacuole', 'Lysosome'); INSERT INTO Cell VALUES ('What is the genetic material found in the nucleus of a eukaryotic cell?', 'RNA', 'DNA', 'Protein', 'Carbohydrate', 'DNA'); INSERT INTO Cell VALUES ('Which process involves the division of a single cell into two identical daughter cells?', 'Meiosis', 'Mitosis', 'Fertilization', 'Apoptosis', 'Mitosis'); CREATE TABLE Oceans( Question VARCHAR(300), Option1 VARCHAR(100), Option2 VARCHAR(100), Option3 VARCHAR(100), Option4 VARCHAR(100), correctOption VARCHAR(100) ); INSERT INTO Oceans VALUES ('Which is the largest ocean on Earth?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Pacific Ocean', 'Pacific Ocean'); INSERT INTO Oceans VALUES ('What is the average depth of the worlds oceans?', '1,000 meters', '3,000 meters', '4,000 meters', '5,000 meters', '3,000 meters'); INSERT INTO Oceans VALUES ('Which ocean is the saltiest?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Atlantic Ocean'); INSERT INTO Oceans VALUES ('What is the name of the smallest ocean?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Arctic Ocean'); INSERT INTO Oceans VALUES ('Which ocean is known as the "Herring Pond"?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Atlantic Ocean'); INSERT INTO Oceans VALUES ('Which ocean is the warmest?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Pacific Ocean', 'Indian Ocean'); INSERT INTO Oceans VALUES ('In which ocean is the Mariana Trench located?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Pacific Ocean', 'Pacific Ocean'); INSERT INTO Oceans VALUES ('What percentage of Earths surface is covered by oceans?', '50%', '60%', '70%', '80%', '70%'); INSERT INTO Oceans VALUES ('Which ocean is the youngest?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Atlantic Ocean'); INSERT INTO Oceans VALUES ('What is the name of the current that flows along the western coast of South America?', 'Humboldt Current', 'North Equatorial Current', 'Gulf Stream', 'Kuroshio Current', 'Humboldt Current'); INSERT INTO Oceans VALUES ('Which ocean is the saltiest?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Atlantic Ocean'); INSERT INTO Oceans VALUES ('What is the worlds largest coral reef system, located in the Coral Sea?', 'Great Barrier Reef', 'Belize Barrier Reef', 'Red Sea Coral Reef', 'Mesoamerican Barrier Reef', 'Great Barrier Reef'); INSERT INTO Oceans VALUES ('In which ocean is the Sargasso Sea located?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Atlantic Ocean'); INSERT INTO Oceans VALUES ('Which ocean is the coldest?', 'Atlantic Ocean', 'Indian Ocean', 'Southern Ocean', 'Arctic Ocean', 'Southern Ocean'); INSERT INTO Oceans VALUES ('What is the name of the ocean current that flows from the Gulf of Mexico to the North Atlantic?', 'Gulf Stream', 'Kuroshio Current', 'California Current', 'Canary Current', 'Gulf Stream');