03 Web & Data
IMPORTANT:
Pt. A: Cardinality + Data is made and handed in as groups:
https://ek.itslearning.com/LearningToolElement/ViewLearningToolElement.aspx?LearningToolElementId=1411233
Pt. B: Web is made an handed in individually
I skal aflevere jeres koden i et github repository. Fx i en
main.jseller måske laver i en js fil for hver opgave. Det er op til jer.I må rigtig gerne gøre så i deployer jeres redesignede website.
https://ek.itslearning.com/LearningToolElement/ViewLearningToolElement.aspx?LearningToolElementId=1433524
Groups can be seen in the bottom.
Deadline: 12/10-2025.
Cardinality
Describe Cardinality:
What is cardinality in the context of database design?
How do different types of cardinality (1:1, 1:N, N:N) affect relationships between entities?
What does the tables look like?
Identify Relationships and Cardinality: Consider the following database schema representing a simple book publishing system. Identify the relationships and specify their cardinality between the following entities:
Schema:
Author: (Author_ID, Name, Date_of_Birth, Nationality)
Book: (ISBN, Title, Publication_Date, Author_ID, Language, Genre)
Book_Publisher: (Book_publisher_ID, ISBN, Publisher)
Publisher: (Publisher_ID, Name, Country, Founded_Year)
Review: (Review_ID, Score, Comment, Date, ISBN, User_ID)
User: (User_ID, Username, Email, Country)
Questions:What is the cardinality between Author and Book? Can a book have multiple authors? Can an author write more than one book?
What is the cardinality between Book and Publisher? Can a book be published by more than one publisher? Can a publisher publish multiple books?
What is the cardinality between Book and Review? Can a book have multiple reviews? Can a user review multiple books?
What is the cardinality between User and Review? Can a user leave multiple reviews? Can a review belong to more than one user?
Data
Escape Room Game Design and Player Analytics Platform
Project Overview: Design a MySQL database for an escape room business that allows game designers to manage different escape room scenarios, track team progress through rooms, record success rates, and analyze player behaviors. The database supports managing different escape room experiences, logging player actions, tracking team completions, and providing analytics on game difficulty and player performance.
Entities & Relationships
Escape Rooms:
RoomID,
Title,Theme(e.g., "Haunted Mansion", "Alien Invasion"),DifficultyLevel,Duration(in minutes).Each room can have multiple Puzzles and can host multiple Teams.
Puzzles:
PuzzleID,
RoomID,PuzzleName,Description,PuzzleType(e.g., "Logic", "Search", "Riddle"),DifficultyRating.Puzzles are linked to Escape Rooms.
Teams:
TeamID,
TeamName,StartTime,EndTime,CompletionStatus(e.g., "Solved", "Timed Out").Teams can play different escape rooms, and each team consists of multiple Players.
Players:
PlayerID,
Name,Nickname,Email.Players join Teams, and their performance is tracked during the game.
Team Progress:
ProgressID,
TeamID,PuzzleID,StartTime,EndTime,SolvedStatus(e.g., "Solved", "Failed").Tracks team progress on each puzzle to determine which were solved and how long each took.
Hints:
HintID,
PuzzleID,HintText,UsageCount.Tracks the hints available for each puzzle and how often they were requested.
Player Actions:
ActionID,
PlayerID,PuzzleID,ActionType(e.g., "Attempt", "HintRequest"),ActionTimestamp.Records significant actions performed by each player during the game for deeper analytics.
The escape room host will record actions when observing the players
Populate the tables with data and write 3 query examples that queries the database and provides insight in the data.
Export an EER diagram showcasing the database design
Web
01 - Rekonstrurer hjemmeside - HTML og CSS
Tag en hjemmeside du bruger dagligt og rekonstruer den vha html og css. Husk også mobil!
I opgavebesvarelsen husk at tilføje screenshot/screnshots af hjemmesiden
Hvor meget i detaljen du går er op til dig selv. Det vigtigste er at layoutet stemmer nogenlunde overens. Om i lige får den rigtige skygge, farve eller animation er ikke så relevant. Fokus er på layoutdelen
02 - Startup name generator
Let's create a function that can generate startup names:
Create a function called getStartupName. When called it should return a random startup name. Here is how it should work:
Inside the function there should be two arrays with starutp words
Use the two arrays to get a random word from each array and return the new startup name with the two words
Here is an example with the following two arrays:
Example outputs
Hint: to figure out how to get a random number. Try asking google or ChatGPT
03 - Treasure Hunter
Scenario: You are on a small island, and there's a treasure box hidden somewhere! Your job is to move around the island to find it.
Instructions:
Island Setup:
The island is represented by a 1D array of 5 elements.
One of these elements is the hidden treasure (
T), and the rest are empty (-).
Example:
Objectives:
Log out how many moves there are in the island - level 1
For each move log the following out - level 2 If there is a treasure log out:
Treasure found at move 3 :)If there is not a treasure log out:No treasure found :(Log out how many treasures there are in the island - level 3
Example output:
The following array should output the following:
Another example:
04 - Student Grades Analysis
Objective: In this exercise, students will create a program that analyzes student grades, determines the highest and lowest grades, and calculates the average grade.
Instructions:
Create an array that holds 8 grades (integers between 0 and 100) representing the scores of different students - level 1
Log out how many grades there are - level 1
Classify and log each grade into one of the following categories - level 2
Aif the grade is 90 or above.Bif the grade is between 80 and 89.Cif the grade is between 70 and 79.Dif the grade is between 60 and 69.Fif the grade is below 60.
Evaluate overall class performance - level 2
If the average grade is 90 or above, the class performance is
Excellent.If the average grade is between 80 and 89, the performance is
Good.If the average grade is between 70 and 79, the performance is
Satisfactory.If the average grade is below 70, the performance is
Needs Improvement.
Optional - Determine - level 3
The highest grade in the array.
The lowest grade in the array.
The average grade.
Output:
The highest grade with its category.
The lowest grade with its category.
The average grade.
A list of all grades with their corresponding categories.
Example of Expected Output:
For the following input:
The expected output should be:
06 - Dice Rolling Championship
Scenario: Two players compete in a dice rolling championship! Each player takes turns rolling a dice, and after 10 rounds, the player with the highest total score wins.
Instructions:
Level 1 - Player Setup
Get Player Names:
Use
prompt()to ask for Player 1's nameUse
prompt()to ask for Player 2's nameLog both names to the console to confirm
Example output:
Level 2 - Single Round
Simulate One Round:
Create a function that generates a random dice roll (1-6)
When the player presses a key (use
prompt()with a message like "Press Enter to roll"), generate a random numberLog the result for both players
Example output:
Hint: Use Math.random() and Math.floor() to generate random numbers between 1 and 6
Level 3 - Track Scores
Keep Score:
Create variables to track each player's total score
After each round, add the dice roll to the player's total
Log the current totals after each round
Example output:
Level 4 - Complete Game (10 Rounds)
Full Game Loop:
Use a loop to run exactly 10 rounds
Each round should:
Display the round number
Let Player 1 roll (wait for Enter press via
prompt())Let Player 2 roll (wait for Enter press via
prompt())Show both rolls and updated totals
After 10 rounds, announce the winner
Example output:
Extensions - optional
Best of Three:
Play 3 complete games (3 sets of 10 rounds)
Track wins for each player
Declare an overall champion
Dice Roll History:
Store all dice rolls in an array
At the end, show statistics:
Highest single roll for each player
Lowest single roll for each player
Average roll per player
Bonus Rounds:
If there's a tie after 10 rounds, enter sudden death mode
Players keep rolling until someone wins a round
Multiplayer:
Extend the game to support 3-4 players
Use an array to store player names and scores
Group 1
Johanne Schledermann
Stephanie Skjøtt
Peter Reedtz
Group 2
Ali Hussein Ibrahim
kagi0001
vial0001
Group 3
Jacob
Mohsen
Kenadid Kablalah
Group 4
Kai Thelonious Brooklyn
Maja Samer
Nikolaj Birkelund
Group 5
Freja Johnna
Beyza
Christoffer Bohnzen
Group 6
Oliver Baasch
Rosalina Hoff
Benjamin Skak Vestergaard
Group 7
Mathias Hartung
Oliver Fritz
Astrid Sofie
Group 8
Magnus Egemose
Loui Fatum
Nina Lind
Group 9
Jannik Wæver
Sylvester Erbs
Sebastian Herler
Group 10
Simon
Amira
Baldur Thorkildshøj
Group 11
Elliot Theodor Lyhne
Oscar Bertram Merino
thmo0003
Group 12
Mariam
Carla Isabel
Mathilde Louise Farnø
Group 13
Frederik Egede
Mathias Albin
Sebastian Sigurd Sandby
Group 14
Pin Yuan
seho0004
Hjalte-Emil Schultz
Group 15
Noah Prang
Jonas Mørk
Storm Dyva
Group 16
Gustav Felix Anker
Sofia Rosa
Victor Bischoff
Last updated