From e264e757e44b58d71cd2e486b4a5aff3073ff6ab Mon Sep 17 00:00:00 2001 From: SowinskiBraeden Date: Thu, 13 Nov 2025 22:07:37 -0800 Subject: [PATCH] fix lab09 && move term project out --- data/project/facts/a.txt | 55 +++++++ data/project/facts/b.txt | 85 +++++++++++ data/project/facts/c.txt | 85 +++++++++++ data/project/facts/d.txt | 20 +++ data/project/facts/e.txt | 45 ++++++ data/project/facts/f.txt | 15 ++ data/project/facts/g.txt | 55 +++++++ data/project/facts/h.txt | 15 ++ data/project/facts/i.txt | 40 +++++ data/project/facts/j.txt | 15 ++ data/project/facts/k.txt | 25 ++++ data/project/facts/l.txt | 45 ++++++ data/project/facts/m.txt | 85 +++++++++++ data/project/facts/n.txt | 56 +++++++ data/project/facts/o.txt | 5 + data/project/facts/p.txt | 45 ++++++ data/project/facts/q.txt | 5 + data/project/facts/r.txt | 15 ++ data/project/facts/s.txt | 130 ++++++++++++++++ data/project/facts/t.txt | 45 ++++++ data/project/facts/u.txt | 35 +++++ data/project/facts/v.txt | 20 +++ data/project/facts/y.txt | 5 + data/project/facts/z.txt | 10 ++ src/code/ca/bcit/comp2522/lab09/WordList.java | 4 +- .../ca/bcit/comp2522/project/Country.java | 25 ---- src/code/ca/bcit/comp2522/project/Main.java | 54 ------- .../ca/bcit/comp2522/project/ScoreTest.java | 141 ++++++++++++++++++ 28 files changed, 1100 insertions(+), 80 deletions(-) create mode 100644 data/project/facts/a.txt create mode 100644 data/project/facts/b.txt create mode 100644 data/project/facts/c.txt create mode 100644 data/project/facts/d.txt create mode 100644 data/project/facts/e.txt create mode 100644 data/project/facts/f.txt create mode 100644 data/project/facts/g.txt create mode 100644 data/project/facts/h.txt create mode 100644 data/project/facts/i.txt create mode 100644 data/project/facts/j.txt create mode 100644 data/project/facts/k.txt create mode 100644 data/project/facts/l.txt create mode 100644 data/project/facts/m.txt create mode 100644 data/project/facts/n.txt create mode 100644 data/project/facts/o.txt create mode 100644 data/project/facts/p.txt create mode 100644 data/project/facts/q.txt create mode 100644 data/project/facts/r.txt create mode 100644 data/project/facts/s.txt create mode 100644 data/project/facts/t.txt create mode 100644 data/project/facts/u.txt create mode 100644 data/project/facts/v.txt create mode 100644 data/project/facts/y.txt create mode 100644 data/project/facts/z.txt delete mode 100644 src/code/ca/bcit/comp2522/project/Country.java delete mode 100644 src/code/ca/bcit/comp2522/project/Main.java create mode 100644 src/tests/ca/bcit/comp2522/project/ScoreTest.java diff --git a/data/project/facts/a.txt b/data/project/facts/a.txt new file mode 100644 index 0000000..e88769e --- /dev/null +++ b/data/project/facts/a.txt @@ -0,0 +1,55 @@ + +Afghanistan:Kabul +Home to the ancient Silk Road trading route. +Known for its mountainous terrain, including the Hindu Kush range. +Produces some of the world's finest pomegranates and saffron. + +Albania:Tirana +Over 170,000 bunkers were built during the communist era. +The national hero, Skanderbeg, resisted Ottoman rule for 25 years. +Traditional polyphonic folk music is recognized by UNESCO as intangible cultural heritage. + +Algeria:Algiers +The largest country in Africa by land area. +Home to the Sahara Desert, which covers more than 80% of its territory. +Ancient rock art in Tassili n'Ajjer depicts a once-lush Sahara. + +Andorra:Andorra la Vella +One of the smallest countries in Europe, located between France and Spain. +Has the highest life expectancy in the world at about 83 years. +The only country with Catalan as its sole official language. + +Angola:Luanda +Second-largest producer of diamonds in Africa. +Home to the Quiçama National Park, known for its "Operation Noah's Ark" wildlife reintroduction. +Has a unique geographic feature called Kalandula Falls, one of Africa's largest waterfalls. + +Antigua and Barbuda:Saint John's +Comprises 365 beaches, "one for every day of the year." +Home to the restored Nelson's Dockyard, a UNESCO World Heritage site. +The national sport is cricket, with several famous players hailing from here. + +Argentina:Buenos Aires +Birthplace of tango, the passionate dance and music genre. +Home to the Perito Moreno Glacier, one of the few advancing glaciers in the world. +Produces some of the world's finest beef and Malbec wine. + +Armenia:Yerevan +One of the oldest continuously inhabited cities in the world. +First nation to adopt Christianity as a state religion in 301 AD. +Home to the world's oldest winery, dating back 6,100 years. + +Australia:Canberra +The only continent that is also a country. +Home to unique wildlife like kangaroos, koalas, and platypuses. +The Great Barrier Reef, the world's largest coral reef system, lies off its coast. + +Austria:Vienna +Birthplace of classical composers Mozart, Beethoven, and Schubert. +Known for its coffee house culture, recognized by UNESCO. +Home to the world's oldest zoo, Tiergarten Schönbrunn. + +Azerbaijan:Baku +Famous for its "Flame Towers," a modern architectural marvel. +Has ancient Zoroastrian fire temples, reflecting its long history. +Known for hosting the Formula 1 Grand Prix along its city streets. diff --git a/data/project/facts/b.txt b/data/project/facts/b.txt new file mode 100644 index 0000000..4d0f7a9 --- /dev/null +++ b/data/project/facts/b.txt @@ -0,0 +1,85 @@ + +Bahamas:Nassau +Composed of 700 islands and cays. +Famous for its crystal-clear blue waters and coral reefs. +Pirates once ruled its capital in the early 18th century. + +Bahrain:Manama +Known as one of the oldest centers for pearling. +Famous for the Tree of Life, which grows in the desert with no apparent water source. +Hosts one of the region's most significant Formula 1 Grand Prix races. + +Bangladesh:Dhaka +The world's largest river delta is located here. +It is the second-largest producer of garments globally. +Famous for its boat-building tradition, dating back over 2,000 years. + +Barbados:Bridgetown +The only country visited by George Washington outside North America. +Known for producing world-class rum. +Hosts one of the most vibrant and colorful carnivals in the Caribbean. + +Belarus:Minsk +Home to one of the largest remaining primeval forests in Europe. +Known for its Soviet-era architecture and monuments. +Major producer of tractors and agricultural machinery. + +Belgium:Brussels +Known for its chocolate, waffles, and beer. +Home to the European Union's headquarters. +Its capital has one of the most famous squares in Europe, the Grand Place. + +Belize:Belmopan +Home to the second-largest barrier reef in the world. +Famous for its Mayan ruins scattered across the country. +English is the official language, unique in Central America. + +Benin:Porto-Novo +Known as the birthplace of the Vodun (Voodoo) religion. +Home to the Royal Palaces of Abomey, a UNESCO World Heritage site. +Once part of the powerful Dahomey Kingdom. + +Bhutan:Thimphu +Measures Gross National Happiness as a measure of success. +Known for its beautiful monasteries, including the famous Tiger's Nest. +The only country in the world that absorbs more carbon than it emits. + +Bolivia:Sucre +Home to the world's largest salt flat, Salar de Uyuni. +Known for Lake Titicaca, the highest navigable lake in the world. +Has two capital cities, with La Paz being the highest administrative capital in the world. + +Bosnia and Herzegovina:Sarajevo +Famous for its cultural diversity, with influences from the Ottoman and Austro-Hungarian empires. +Hosted the Winter Olympics in 1984. +The site of the assassination that sparked World War I. + +Botswana:Gaborone +Known for its vast wildlife reserves and large elephant populations. +Famous for the Okavango Delta, one of the most biodiverse areas in the world. +One of Africa's most stable democracies. + +Brazil:Brasília +Known for its famous Carnival, a vibrant festival celebrated every year. +The Amazon Rainforest, the world's largest, covers a large portion of this country. +Home to the iconic Christ the Redeemer statue, one of the New Seven Wonders of the World. + +Brunei:Bandar Seri Begawan +One of the wealthiest countries in the world due to its oil and gas reserves. +Ruled by one of the world's longest-reigning monarchs. +Famous for its opulent mosques, including the Sultan Omar Ali Saifuddien Mosque. + +Bulgaria:Sofia +Home to the ancient city of Plovdiv, one of the oldest continuously inhabited cities in the world. +Famous for producing over 80% of the world's rose oil, used in perfumes. +Known for its rich folk music tradition, including the hauntingly beautiful women's choir. + +Burkina Faso:Ouagadougou +One of the top producers of cotton in Africa. +Known for its rich cultural festivals, including FESPACO, Africa's largest film festival. +Famous for the Domes of Fabedougou, a unique geological formation. + +Burundi:Gitega +Known for its traditional drumming, which is recognized by UNESCO. +Home to Lake Tanganyika, one of the world's deepest and longest freshwater lakes. +One of the most densely populated countries in Africa. diff --git a/data/project/facts/c.txt b/data/project/facts/c.txt new file mode 100644 index 0000000..b993381 --- /dev/null +++ b/data/project/facts/c.txt @@ -0,0 +1,85 @@ + +Cabo Verde:Praia +An archipelago off the coast of West Africa. +Famous for its morna music, popularized by singer Cesária Évora. +Known for its dry, desert-like climate despite being in the tropics. + +Cambodia:Phnom Penh +Home to Angkor Wat, the largest religious monument in the world. +Known for the tragic history of the Khmer Rouge regime. +Famous for its unique silk-weaving tradition, which dates back centuries. + +Cameroon:Yaoundé +Known for its diverse landscape, from mountains to rainforests and savannas. +Famous for its coffee and cocoa production. +The country has more than 230 spoken languages. + +Canada:Ottawa +Home to the longest coastline in the world. +Famous for its maple syrup production, accounting for 71% of the world's supply. +One of the most multicultural nations in the world, with more than 200 ethnic origins represented. + +Central African Republic:Bangui +Known for its rich biodiversity, including elephants, gorillas, and forest buffalo. +The Dzanga-Sangha Reserve is home to one of the last remaining pygmy populations. +Diamonds are one of the country’s major exports. + +Chad:N'Djamena +Lake Chad is one of the largest lakes in Africa but is shrinking rapidly. +The Tibesti Mountains in the north are home to some of the oldest rock paintings. +Known as the "Dead Heart of Africa" due to its central desert region. + +Chile:Santiago +Home to the driest desert in the world, the Atacama Desert. +Famous for its long, narrow geography, stretching across 4,300 km. +Known for Easter Island, home to the iconic Moai statues. + +China:Beijing +The most populous country in the world. +Home to the Great Wall, the longest wall in the world. +Known for the Forbidden City, the largest ancient palace in the world. + +Colombia:Bogotá +The second most biodiverse country in the world. +Known for producing the world’s best coffee. +Famous for its annual Flower Festival, showcasing over 500,000 blooms. + +Comoros:Moroni +An archipelago located in the Indian Ocean, known as "the Perfume Islands" for its ylang-ylang production. +One of the smallest countries in Africa by land area and population. +Famous for its volcanic landscape, particularly Mount Karthala, one of the world’s most active volcanoes. + +Congo, Democratic Republic of the:Kinshasa +Home to the second-largest rainforest in the world, after the Amazon. +The Congo River is the second longest in Africa and the deepest in the world. +Known for its rich mineral resources, including cobalt and copper. + +Congo, Republic of the:Brazzaville +Shares the Congo River with its neighbor, the Democratic Republic of the Congo. +Known for its diverse wildlife, including western lowland gorillas. +Famous for the Basilique Sainte-Anne, one of Africa’s most impressive churches. + +Costa Rica:San José +Famous for its biodiversity, housing 5% of the world’s species. +Has no standing army, abolished in 1949. +Known for its commitment to sustainability and eco-tourism. + +Croatia:Zagreb +Home to over 1,000 islands, only about 50 of which are inhabited. +Famous for its picturesque Dalmatian coastline along the Adriatic Sea. +The city of Dubrovnik is known as the "Pearl of the Adriatic." + +Cuba:Havana +Famous for its cigars and rum, made from local sugarcane. +Known for its vintage cars and colonial architecture. +The largest island in the Caribbean, with over 5,700 kilometers of coastline. + +Cyprus:Nicosia +The island is divided into Greek Cypriot and Turkish Cypriot regions. +Famous for being the legendary birthplace of the goddess Aphrodite. +Known for its Halloumi cheese, a traditional delicacy. + +Czech Republic:Prague +Famous for its medieval Old Town and Prague Castle, the largest ancient castle in the world. +Known for its rich beer-brewing tradition, with the highest beer consumption per capita globally. +Home to Charles Bridge, a historic bridge adorned with 30 statues. diff --git a/data/project/facts/d.txt b/data/project/facts/d.txt new file mode 100644 index 0000000..9d56bf2 --- /dev/null +++ b/data/project/facts/d.txt @@ -0,0 +1,20 @@ + +Denmark:Copenhagen +Known for the "happiest people in the world" according to global happiness rankings. +Famous for its bicycle-friendly culture and having more bikes than cars. +The birthplace of LEGO, one of the world’s most popular toys. + +Djibouti:Djibouti +Home to Lake Assal, the saltiest lake outside of Antarctica. +Located on one of the busiest shipping routes in the world, the Bab-el-Mandeb Strait. +Famous for its dramatic desert landscapes and limestone formations. + +Dominica:Roseau +Known as the "Nature Island" due to its lush rainforests and boiling lakes. +Famous for Morne Trois Pitons National Park, a UNESCO World Heritage site. +One of the few Caribbean islands with an indigenous population, the Kalinago people. + +Dominican Republic:Santo Domingo +Shares the island of Hispaniola with Haiti. +The first European settlement in the Americas, founded by Christopher Columbus’s brother. +Known for its merengue and bachata music and dance styles. diff --git a/data/project/facts/e.txt b/data/project/facts/e.txt new file mode 100644 index 0000000..da76196 --- /dev/null +++ b/data/project/facts/e.txt @@ -0,0 +1,45 @@ + +East Timor:Dili +One of the youngest countries in the world, gaining independence in 2002. +Known for its stunning coral reefs and rich marine biodiversity. +Coffee is one of the country’s major exports. + +Ecuador:Quito +The country is named after the Equator, which runs through it. +Famous for the Galápagos Islands, home to unique wildlife species. +Known for its colonial architecture, particularly in Quito, a UNESCO World Heritage site. + +Egypt:Cairo +Home to the last surviving Wonder of the Ancient World, the Pyramids of Giza. +The Nile River, the longest in the world, runs through the country. +Famous for its ancient history and archaeological sites, including the Valley of the Kings. + +El Salvador:San Salvador +The smallest and most densely populated country in Central America. +Known for its Pacific Ocean beaches and surf spots. +Coffee and sugarcane are key exports. + +Equatorial Guinea:Malabo +The only African country where Spanish is the official language. +Oil and gas account for the majority of its GDP. +Famous for its rich rainforests and diverse wildlife. + +Eritrea:Asmara +Known for its well-preserved Italian colonial architecture. +Home to one of the world’s highest concentrations of ancient rock art. +Gained independence from Ethiopia in 1993 after a 30-year war. + +Estonia:Tallinn +One of the most digitally advanced countries in the world, with e-government services. +Known for its medieval Old Town, a UNESCO World Heritage site. +The first country to offer e-residency, allowing foreign nationals to start businesses online. + +Eswatini (formerly Swaziland):Mbabane +One of the few remaining absolute monarchies in the world. +Known for its rich cultural traditions, including the Umhlanga (reed dance) festival. +Home to beautiful nature reserves and wildlife, including lions and rhinos. + +Ethiopia:Addis Ababa +The only African country never colonized (except briefly by Italy). +Home to the oldest known human ancestors, dating back 3.2 million years. +Known for its coffee, believed to be the birthplace of the coffee bean. diff --git a/data/project/facts/f.txt b/data/project/facts/f.txt new file mode 100644 index 0000000..2f3eca3 --- /dev/null +++ b/data/project/facts/f.txt @@ -0,0 +1,15 @@ + +Fiji:Suva +An archipelago of over 300 islands. +Known for its clear blue waters, coral reefs, and white-sand beaches. +Rugby is the national sport, and the country has won Olympic gold in rugby sevens. + +Finland:Helsinki +Known for its vast forests and thousands of lakes. +Famous for being one of the happiest countries in the world. +The sauna is an essential part of the culture, with more saunas than cars. + +France:Paris +Known for its iconic landmarks, including the Eiffel Tower and the Louvre Museum. +One of the world’s most influential countries in art, fashion, and cuisine. +Home to the world’s most visited art museum, the Louvre. diff --git a/data/project/facts/g.txt b/data/project/facts/g.txt new file mode 100644 index 0000000..7d89888 --- /dev/null +++ b/data/project/facts/g.txt @@ -0,0 +1,55 @@ + +Gabon:Libreville +Nearly 90% of the country is covered by rainforests. +Famous for its lowland gorilla population. +Rich in oil, making it one of Africa’s wealthiest nations by GDP per capita. + +Gambia:Banjul +The smallest country on mainland Africa. +Known for its beautiful Atlantic coastline and river. +Famous for its birdwatching, with over 540 bird species recorded. + +Georgia:Tbilisi +Home to some of the oldest known wine regions in the world. +Known for its beautiful mountainous landscapes, particularly the Caucasus. +Famous for its unique alphabet, one of only 14 existing in the world today. + +Germany:Berlin +Famous for its history, including the Berlin Wall and Brandenburg Gate. +Known for its engineering, particularly in automobiles and machinery. +Oktoberfest in Munich is one of the world’s largest beer festivals. + +Ghana:Accra +Known for its vibrant culture, including kente cloth and traditional drumming. +The first African country to gain independence from colonial rule in 1957. +Famous for its cocoa production, one of the largest in the world. + +Greece:Athens +Known as the birthplace of democracy and Western philosophy. +Famous for ancient landmarks like the Parthenon and the Acropolis. +Home to more than 6,000 islands, though only about 227 are inhabited. + +Grenada:Saint George's +Known as the "Island of Spice" for its nutmeg and mace production. +Famous for its lush rainforests, waterfalls, and beaches. +Home to one of the world’s first underwater sculpture parks. + +Guatemala:Guatemala City +Known for its rich Mayan heritage, including ruins like Tikal. +Produces some of the world’s best coffee. +Famous for Lake Atitlán, surrounded by volcanoes and indigenous villages. + +Guinea:Conakry +Known for its mineral wealth, particularly bauxite, a key ingredient in aluminum production. +Has one of West Africa's most active volcanoes, Mount Nimba. +Famous for its diverse traditional music and dance. + +Guinea-Bissau:Bissau +Famous for the Bijagós Archipelago, a UNESCO Biosphere Reserve. +One of the least-visited countries in the world, known for its unspoiled beauty. +Known for its cashew nut exports, a major part of the economy. + +Guyana:Georgetown +Home to Kaieteur Falls, one of the world’s tallest single-drop waterfalls. +Known for its dense rainforests, which cover over 80% of the country. +The only South American country with English as its official language. diff --git a/data/project/facts/h.txt b/data/project/facts/h.txt new file mode 100644 index 0000000..82fa812 --- /dev/null +++ b/data/project/facts/h.txt @@ -0,0 +1,15 @@ + +Haiti:Port-au-Prince +The first independent nation in Latin America and the Caribbean, gaining independence in 1804. +Famous for its vibrant and unique culture, including Vodou religion. +Home to the Citadelle Laferrière, the largest fortress in the Americas. + +Honduras:Tegucigalpa +Home to the ancient Mayan ruins of Copán, a UNESCO World Heritage site. +One of the largest exporters of bananas and coffee in Central America. +Known for its natural beauty, including stunning beaches and tropical rainforests. + +Hungary:Budapest +Famous for its historic thermal baths, some dating back to the Roman times. +Home to the largest lake in Central Europe, Lake Balaton. +Known for its goulash, a traditional Hungarian stew, and paprika spice. diff --git a/data/project/facts/i.txt b/data/project/facts/i.txt new file mode 100644 index 0000000..1274b36 --- /dev/null +++ b/data/project/facts/i.txt @@ -0,0 +1,40 @@ + +Iceland:Reykjavik +Known for its stunning natural beauty, including geysers, volcanoes, and glaciers. +One of the most eco-friendly countries, with most of its energy coming from geothermal and hydropower. +Home to the famous Blue Lagoon, a geothermal spa and popular tourist attraction. + +India:New Delhi +The second most populous country in the world. +Home to the Taj Mahal, one of the New Seven Wonders of the World. +Known for its rich cultural diversity, with more than 2,000 distinct ethnic groups. + +Indonesia:Jakarta +The world's largest archipelago, made up of over 17,000 islands. +Home to the Komodo dragon, the largest living species of lizard. +Famous for Bali, one of the world’s top tourist destinations. + +Iran:Tehran +Known for its ancient Persian Empire, with historical sites like Persepolis. +The world’s largest producer of saffron, also known as "red gold." +Home to Mount Damavand, the highest peak in the Middle East. + +Iraq:Baghdad +Known as the heart of ancient Mesopotamia, the "Cradle of Civilization." +Home to the Ziggurat of Ur, one of the oldest temples in the world. +Famous for the Tigris and Euphrates rivers, central to the development of early human civilization. + +Ireland:Dublin +Known for its literary heritage, being the home of writers like James Joyce and Oscar Wilde. +Famous for its lush green landscapes, earning it the nickname "The Emerald Isle." +St. Patrick's Day, celebrated worldwide, originated here. + +Israel:Jerusalem +One of the most historically significant cities in the world, sacred to Judaism, Christianity, and Islam. +Home to the Dead Sea, the lowest point on Earth’s surface. +Known for its high-tech industry, earning it the nickname "Startup Nation." + +Italy:Rome +Famous for its ancient history, including landmarks like the Colosseum and the Roman Forum. +Home to the Vatican City, the smallest independent state in the world. +Renowned for its cuisine, including pizza, pasta, and gelato. diff --git a/data/project/facts/j.txt b/data/project/facts/j.txt new file mode 100644 index 0000000..bfdc4a5 --- /dev/null +++ b/data/project/facts/j.txt @@ -0,0 +1,15 @@ + +Jamaica:Kingston +Known as the birthplace of reggae music, made famous by Bob Marley. +Famous for its beautiful beaches, including Negril and Montego Bay. +Home to Usain Bolt, the fastest sprinter in the world. + +Japan:Tokyo +Known for its mix of ancient traditions and cutting-edge technology. +Home to Mount Fuji, the highest peak in Japan and a symbol of the country. +Famous for its cuisine, including sushi, ramen, and tempura. + +Jordan:Amman +Home to the ancient city of Petra, one of the New Seven Wonders of the World. +The Dead Sea, the lowest point on Earth, is shared with Israel. +Known for its Bedouin culture and desert landscapes, including Wadi Rum. diff --git a/data/project/facts/k.txt b/data/project/facts/k.txt new file mode 100644 index 0000000..6288912 --- /dev/null +++ b/data/project/facts/k.txt @@ -0,0 +1,25 @@ + +Kazakhstan:Astana +The largest landlocked country in the world. +Home to the Baikonur Cosmodrome, the world’s first and largest spaceport. +Known for its vast steppes, which make up a third of the country’s landscape. + +Kenya:Nairobi +Known for its wildlife and safaris, particularly in the Maasai Mara. +Home to Mount Kenya, the second-highest mountain in Africa. +Famous for its long-distance runners, who dominate international competitions. + +Kiribati:Tarawa +One of the world’s lowest-lying countries, threatened by rising sea levels. +Consists of 33 atolls and reef islands in the Pacific Ocean. +Known for its traditional canoe-making and navigation skills. + +Kuwait:Kuwait City +One of the richest countries in the world due to its oil reserves. +The first Gulf country to establish a constitution and parliament. +Famous for the Kuwait Towers, a symbol of the country’s modern development. + +Kyrgyzstan:Bishkek +Famous for its nomadic culture and the traditional yurt dwellings. +Home to Lake Issyk-Kul, one of the largest alpine lakes in the world. +Known for its rugged mountains, making up 90% of the country’s terrain. diff --git a/data/project/facts/l.txt b/data/project/facts/l.txt new file mode 100644 index 0000000..324f194 --- /dev/null +++ b/data/project/facts/l.txt @@ -0,0 +1,45 @@ + +Laos:Vientiane +The only landlocked country in Southeast Asia. +Famous for its stunning waterfalls, such as Kuang Si Falls. +Known for its Buddhist temples, including the golden Pha That Luang. + +Latvia:Riga +Known for its stunning Art Nouveau architecture. +One of the greenest countries in the world, with over half of its land covered by forests. +Famous for its vibrant cultural scene, including the Riga Opera Festival. + +Lebanon:Beirut +Known for its rich history, with ancient cities like Byblos and Tyre. +Famous for its cuisine, particularly mezze dishes like hummus and tabbouleh. +The only Middle Eastern country without a desert. + +Lesotho:Maseru +Completely surrounded by South Africa, it’s one of only three enclaved countries in the world. +Known as the “Kingdom in the Sky” due to its high altitude. +Famous for its Basotho blankets, which are worn by locals during festivals and ceremonies. + +Liberia:Monrovia +Founded by freed American slaves in the 19th century. +The first African country to elect a female president, Ellen Johnson Sirleaf. +Home to the Sapo National Park, one of the last remaining rainforests in West Africa. + +Libya:Tripoli +Home to the ancient Roman ruins of Leptis Magna, one of the best-preserved Roman cities in the world. +Has the largest proven oil reserves in Africa. +Famous for its vast Sahara Desert landscapes, which cover much of the country. + +Liechtenstein:Vaduz +One of the world’s smallest countries, nestled between Switzerland and Austria. +The only country to be entirely located within the Alps. +A constitutional monarchy, ruled by the Liechtenstein family for centuries. + +Lithuania:Vilnius +The first Soviet republic to declare independence in 1990. +Home to the Hill of Crosses, a famous pilgrimage site with thousands of crosses. +Known for its medieval Old Town, a UNESCO World Heritage site. + +Luxembourg:Luxembourg City +One of the world’s wealthiest countries, with a high standard of living. +A founding member of the European Union, NATO, and the United Nations. +Known for its castles, including the fairy-tale-like Vianden Castle. diff --git a/data/project/facts/m.txt b/data/project/facts/m.txt new file mode 100644 index 0000000..622dd61 --- /dev/null +++ b/data/project/facts/m.txt @@ -0,0 +1,85 @@ + +Madagascar:Antananarivo +Known for its biodiversity, with about 90% of its wildlife found nowhere else on Earth. +Home to the famous Avenue of the Baobabs, a road lined with centuries-old trees. +The fourth-largest island in the world. + +Malawi:Lilongwe +Known as the "Warm Heart of Africa" for its friendly people. +Lake Malawi is the third-largest lake in Africa and is home to more fish species than any other lake. +A major producer of tea and tobacco. + +Malaysia:Kuala Lumpur +Famous for the Petronas Towers, once the tallest buildings in the world. +Home to some of the world’s oldest tropical rainforests. +A melting pot of cultures, with significant Malay, Chinese, and Indian populations. + +Maldives:Malé +An island nation made up of 26 atolls and over 1,000 coral islands. +Famous for its luxury resorts and clear blue waters, making it a popular tourist destination. +The lowest-lying country in the world, with an average ground level of just 1.5 meters above sea level. + +Mali:Bamako +Home to the ancient city of Timbuktu, a UNESCO World Heritage site and historic center of learning. +The Niger River, one of Africa's major rivers, flows through the country. +Known for its rich musical traditions, influencing genres like blues and jazz. + +Malta:Valletta +One of the world’s smallest and most densely populated countries. +Famous for its ancient Megalithic Temples, older than Stonehenge and the Pyramids of Giza. +A key strategic location in the Mediterranean, controlled by various empires throughout history. + +Marshall Islands:Majuro +A group of atolls and islands in the Pacific Ocean, with a population spread over 29 atolls. +Known for the Bikini Atoll, where the United States conducted nuclear tests in the mid-20th century. +A leader in climate change awareness due to its vulnerability to rising sea levels. + +Mauritania:Nouakchott +Home to the ancient desert trading city of Chinguetti, a UNESCO World Heritage site. +A large portion of the country is covered by the Sahara Desert. +Known for its traditional Moorish culture and nomadic lifestyle. + +Mauritius:Port Louis +An island nation in the Indian Ocean, known for its beautiful beaches and coral reefs. +Home to the now-extinct dodo bird, which became a symbol of the island. +One of the most politically stable and prosperous countries in Africa. + +Mexico:Mexico City +Home to ancient civilizations like the Maya and Aztec, with ruins such as Chichen Itza and Teotihuacan. +Known for its diverse landscapes, from deserts to jungles and beaches. +Famous for its vibrant culture, including mariachi music, tacos, and Day of the Dead celebrations. + +Micronesia:Palikir +An island nation in the Pacific Ocean, made up of more than 600 islands. +Known for its ancient ruins of Nan Madol, a series of artificial islands. +Heavily reliant on financial assistance from the United States under the Compact of Free Association. + +Moldova:Chișinău +One of the least-visited countries in Europe. +Famous for its wine industry, with some of the largest wine cellars in the world. +Known for its rolling hills, monasteries, and traditional folk music. + +Monaco:Monaco +The second-smallest country in the world, after Vatican City. +Known for its wealth, luxury lifestyle, and the famous Monte Carlo Casino. +Hosts the prestigious Monaco Grand Prix, one of the most famous Formula 1 races. + +Mongolia:Ulaanbaatar +Known for its vast, rugged expanses and nomadic culture. +Home to the Gobi Desert, one of the world’s largest deserts. +Once the heart of the Mongol Empire, led by Genghis Khan in the 13th century. + +Montenegro:Podgorica +Famous for its stunning Adriatic coastline and medieval towns. +Home to the Bay of Kotor, often called Europe’s southernmost fjord. +One of the youngest countries in the world, having gained independence in 2006. + +Morocco:Rabat +Famous for its imperial cities, including Marrakesh, Fez, and Meknes. +The Sahara Desert covers a significant portion of the country’s southeastern region. +Known for its rich cultural heritage, blending Arab, Berber, and European influences. + +Mozambique:Maputo +Known for its beautiful coastline and marine life, including whale sharks and coral reefs. +The Bazaruto Archipelago is one of Africa’s most stunning island chains. +Famous for its vibrant music and dance traditions, particularly marrabenta. diff --git a/data/project/facts/n.txt b/data/project/facts/n.txt new file mode 100644 index 0000000..cf98a64 --- /dev/null +++ b/data/project/facts/n.txt @@ -0,0 +1,56 @@ + +Namibia:Windhoek +Home to the Namib Desert, the world’s oldest desert. +Known for its diverse wildlife, including elephants, cheetahs, and rhinos. +Famous for the towering sand dunes of Sossusvlei, some of the highest in the world. + +Nauru:Yaren +The third smallest country in the world by land area. +Once one of the richest countries in the world due to phosphate mining. +Known for its environmental damage caused by extensive phosphate extraction. + +Nepal:Kathmandu +Home to Mount Everest, the world’s highest peak. +The birthplace of Siddhartha Gautama, the founder of Buddhism. +Known for its diverse landscapes, from the Himalayas to the Terai plains. + +Netherlands:Amsterdam +Famous for its canal system, which is a UNESCO World Heritage site. +Known for its tulip fields, windmills, and cycling culture. +Home to the International Court of Justice in The Hague. + +New Zealand:Wellington +Famous for its stunning natural landscapes, including mountains, fjords, and beaches. +Home to the indigenous Māori culture and language. +Known for being the filming location for "The Lord of the Rings" and "The Hobbit" trilogies. + +Nicaragua:Managua +Known for its many volcanoes, lakes, and beaches. +The largest country in Central America by land area. +Famous for the colonial cities of Granada and León. + +Niger:Niamey +Home to part of the Sahara Desert and the Air Mountains. +The Niger River, one of the major rivers in West Africa, runs through the country. +Known for its rich cultural heritage, particularly the Tuareg and Hausa peoples. + +Nigeria:Abuja +The most populous country in Africa, with over 200 million people. +One of the world’s largest producers of oil. +Famous for Nollywood, the Nigerian film industry, which produces more films than Hollywood. + +North Korea:Pyongyang +One of the most secretive and isolated countries in the world. +Known for its massive military parades and strict government control. +Home to the demilitarized zone (DMZ), the heavily fortified border with South Korea. + +North Macedonia:Skopje +Home to the famous Matka Canyon, known for its stunning cliffs and caves. +The birthplace of Mother Teresa, born in Skopje in 1910. +Known for its rich history, influenced by the Roman, Byzantine, and Ottoman Empires. + +Norway:Oslo +Known for its stunning fjords and rugged coastline. +Famous for the Northern Lights, which can be seen in the northern parts of the country. +Home to the Nobel Peace Prize, awarded annually in Oslo. + diff --git a/data/project/facts/o.txt b/data/project/facts/o.txt new file mode 100644 index 0000000..ab43531 --- /dev/null +++ b/data/project/facts/o.txt @@ -0,0 +1,5 @@ + +Oman:Muscat +Known for its beautiful deserts, mountains, and coastline along the Arabian Sea. +Famous for the ancient frankincense trade, with Oman being one of the world’s top producers. +Home to historic forts and castles, including Nizwa Fort, one of the oldest in Oman. diff --git a/data/project/facts/p.txt b/data/project/facts/p.txt new file mode 100644 index 0000000..f658d68 --- /dev/null +++ b/data/project/facts/p.txt @@ -0,0 +1,45 @@ + +Pakistan:Islamabad +Home to the second-highest mountain in the world, K2. +The Indus River, one of the longest rivers in the world, flows through the country. +Famous for its diverse landscapes, from deserts to forests and mountains. + +Palau:Ngerulmud +An island nation in the Pacific Ocean, known for its pristine coral reefs. +The Rock Islands, a UNESCO World Heritage site, are a popular tourist destination. +One of the world’s leading nations in marine conservation. + +Panama:Panama City +Known for the Panama Canal, one of the most important waterways in the world. +A major international banking and financial hub. +Famous for its biodiversity, with tropical rainforests and over 10,000 plant species. + +Papua New Guinea:Port Moresby +One of the most culturally diverse countries in the world, with over 800 languages spoken. +Home to the Kokoda Track, a historic World War II site and popular hiking route. +Known for its rugged terrain, including mountains, rainforests, and coral reefs. + +Paraguay:Asunción +Known as the "Heart of South America" due to its central location on the continent. +The Paraguay River divides the country into two distinct regions. +Famous for the Guarani culture, with the Guarani language being widely spoken. + +Peru:Lima +Home to Machu Picchu, one of the New Seven Wonders of the World. +The Amazon Rainforest covers more than 60% of the country. +Known for its rich cultural heritage, blending indigenous and Spanish influences. + +Philippines:Manila +An archipelago of over 7,000 islands, located in Southeast Asia. +Known for its stunning beaches, including Boracay and Palawan. +Famous for its biodiversity, with many unique species of plants and animals. + +Poland:Warsaw +Known for its medieval architecture and cities like Kraków and Gdańsk. +Home to Auschwitz, one of the most infamous concentration camps of World War II. +Famous for its hearty cuisine, including pierogi and kielbasa. + +Portugal:Lisbon +One of the oldest nations in Europe, with a history of exploration and maritime dominance. +Known for its beautiful beaches and the Algarve region. +Famous for its Fado music, a genre of melancholic and soulful songs. diff --git a/data/project/facts/q.txt b/data/project/facts/q.txt new file mode 100644 index 0000000..aa08241 --- /dev/null +++ b/data/project/facts/q.txt @@ -0,0 +1,5 @@ + +Qatar:Doha +One of the richest countries in the world due to its vast natural gas reserves. +Home to the futuristic skyline of Doha, which includes many modern skyscrapers. +Set to host the FIFA World Cup in 2022, the first Middle Eastern country to do so. diff --git a/data/project/facts/r.txt b/data/project/facts/r.txt new file mode 100644 index 0000000..091f7fd --- /dev/null +++ b/data/project/facts/r.txt @@ -0,0 +1,15 @@ + +Romania:Bucharest +Home to the world’s heaviest building, the Palace of the Parliament. +Famous for its medieval castles, including Bran Castle, often associated with the Dracula legend. +The Danube River, Europe’s second-longest river, flows through the country. + +Russia:Moscow +The largest country in the world, spanning 11 time zones. +Home to the famous Red Square and St. Basil’s Cathedral. +Known for the Trans-Siberian Railway, the longest railway line in the world. + +Rwanda:Kigali +Known as the "Land of a Thousand Hills" due to its mountainous terrain. +Famous for its mountain gorillas, which can be seen in Volcanoes National Park. +One of the cleanest and safest countries in Africa, with a ban on plastic bags. diff --git a/data/project/facts/s.txt b/data/project/facts/s.txt new file mode 100644 index 0000000..659bc59 --- /dev/null +++ b/data/project/facts/s.txt @@ -0,0 +1,130 @@ + +Saint Kitts and Nevis:Basseterre +The smallest country in the Western Hemisphere by both area and population. +Known for its beautiful beaches and vibrant tourism industry. +Home to the UNESCO-listed Brimstone Hill Fortress, a well-preserved colonial-era fortress. + +Saint Lucia:Castries +Famous for the Pitons, two towering volcanic peaks that are a UNESCO World Heritage site. +Known for its lush rainforests and stunning beaches. +Produces some of the best bananas in the Caribbean. + +Saint Vincent and the Grenadines:Kingstown +An archipelago known for its white-sand beaches and crystal-clear waters. +One of the world's leading producers of arrowroot, a plant used in cooking and medicine. +Famous for the Tobago Cays, a group of small islands popular for snorkeling and sailing. + +Samoa:Apia +A Polynesian island nation in the South Pacific, known for its pristine beaches and clear waters. +Famous for its traditional tattooing and the fa’a Samoa way of life. +Home to Robert Louis Stevenson, the famous author who spent his last years in Samoa. + +San Marino:San Marino +The world's oldest republic, founded in 301 AD. +One of the smallest countries in the world, completely landlocked by Italy. +Known for its medieval architecture, including the Three Towers of San Marino. + +Sao Tome and Principe:São Tomé +A small island nation off the coast of West Africa. +Famous for its rich biodiversity, including endemic bird species. +Once a leading producer of sugar and cocoa, with the nickname "Chocolate Islands." + +Saudi Arabia:Riyadh +Home to Islam's two holiest cities, Mecca and Medina. +One of the largest oil producers in the world. +Known for its vast deserts, including the Rub' al Khali or "Empty Quarter," the largest continuous sand desert in the world. + +Senegal:Dakar +Known for its vibrant music scene, especially the popular mbalax genre. +Home to Gorée Island, a UNESCO World Heritage site and former center of the transatlantic slave trade. +Famous for the Dakar Rally, one of the world’s most challenging off-road races. + +Serbia:Belgrade +One of Europe’s oldest cities, with a history dating back to prehistoric times. +Famous for its vibrant nightlife, particularly in the floating river clubs along the Danube and Sava rivers. +Known for the Kalemegdan Fortress, a historical site that has been fought over in over 100 battles. + +Seychelles:Victoria +An archipelago of 115 islands in the Indian Ocean, known for its pristine beaches. +Home to two UNESCO World Heritage sites, including the Vallée de Mai Nature Reserve. +Famous for the coco de mer, the largest seed in the plant kingdom. + +Sierra Leone:Freetown +Known for its beautiful beaches, particularly those along the Freetown Peninsula. +Famous for its diamond mining industry, which has been both a blessing and a curse for the country. +One of the first countries in Africa to abolish slavery, with Freetown founded as a settlement for freed slaves. + +Singapore:Singapore +One of the world’s wealthiest and most technologically advanced countries. +Famous for its futuristic skyline, including the Marina Bay Sands and Gardens by the Bay. +Known for its cleanliness and strict laws, including a ban on chewing gum. + +Slovakia:Bratislava +Known for its medieval castles, including the famous Bratislava Castle overlooking the Danube River. +Home to the High Tatras, a mountain range popular for hiking and skiing. +A key producer of cars, Slovakia has one of the highest per capita automobile production rates in the world. + +Slovenia:Ljubljana +Famous for its picturesque lakes and mountains, including Lake Bled and the Julian Alps. +One of Europe’s greenest countries, with over 50% of its land covered by forests. +Known for its love of bees, with beekeeping being a significant part of its culture. + +Solomon Islands:Honiara +An archipelago of nearly 1,000 islands in the South Pacific. +Known for its role in World War II, particularly the Battle of Guadalcanal. +Famous for its rich marine biodiversity, making it a popular destination for diving and snorkeling. + +Somalia:Mogadishu +Located on the Horn of Africa, with the longest coastline on the continent. +Known for its rich cultural heritage, including traditional Somali poetry and music. +Has faced decades of civil conflict, but efforts toward rebuilding are ongoing. + +South Africa:Pretoria +Known for its diverse landscapes, including mountains, deserts, and savannas. +Famous for its wildlife, particularly in Kruger National Park. +The country has three capital cities: Pretoria (executive), Bloemfontein (judicial), and Cape Town (legislative). + +South Korea:Seoul +One of the most technologically advanced countries in the world, known for its high-speed internet. +Home to K-pop, which has become a global cultural phenomenon. +Famous for its cuisine, including dishes like kimchi, bulgogi, and bibimbap. + +South Sudan:Juba +The youngest country in the world, having gained independence from Sudan in 2011. +Rich in oil, which plays a crucial role in the country's economy. +Home to vast wetlands and wildlife, including migratory birds and large populations of elephants. + +Spain:Madrid +Known for its rich cultural heritage, including flamenco dancing, bullfighting, and tapas. +Home to famous landmarks like the Alhambra, the Sagrada Familia, and the Prado Museum. +One of the world’s leading producers of olive oil. + +Sri Lanka:Colombo +An island nation off the southern coast of India, known for its tea plantations and spice trade. +Famous for its wildlife, including elephants, leopards, and blue whales. +Home to ancient Buddhist ruins, including the UNESCO World Heritage site Sigiriya. + +Sudan:Khartoum +Located at the confluence of the Blue and White Nile rivers. +Home to more pyramids than Egypt, particularly in the ancient city of Meroe. +One of the largest countries in Africa by land area. + +Suriname:Paramaribo +The smallest country in South America by both area and population. +A former Dutch colony, with Dutch still spoken as the official language. +Famous for its vast rainforests, which cover about 80% of the country. + +Sweden:Stockholm +Known for its high standard of living and social welfare programs. +Famous for its stunning archipelago, with over 30,000 islands. +Home to the Nobel Prize, awarded annually in Stockholm. + +Switzerland:Bern +Famous for its neutrality in global conflicts and its banking industry. +Home to the Swiss Alps, a popular destination for skiing and mountaineering. +Known for its chocolate, watches, and cheese, including fondue and raclette. + +Syria:Damascus +One of the oldest continuously inhabited cities in the world. +Known for its rich history and cultural landmarks, including the Umayyad Mosque. +Has been devastated by a civil war that began in 2011, leading to a humanitarian crisis. diff --git a/data/project/facts/t.txt b/data/project/facts/t.txt new file mode 100644 index 0000000..dc8c038 --- /dev/null +++ b/data/project/facts/t.txt @@ -0,0 +1,45 @@ + +Tajikistan:Dushanbe +Home to the Pamir Mountains, some of the highest in the world. +Known for its ancient Silk Road cities and historical sites. +Heavily reliant on agriculture, with cotton being a major crop. + +Tanzania:Dodoma +Home to Mount Kilimanjaro, the highest peak in Africa. +Known for its famous wildlife reserves, including Serengeti National Park. +The island of Zanzibar, part of Tanzania, is known for its beautiful beaches and spice production. + +Thailand:Bangkok +Known as the "Land of Smiles" due to the friendliness of its people. +Famous for its street food, including dishes like pad Thai and green curry. +Home to beautiful temples, including Wat Phra Kaew and the Grand Palace. + +Togo:Lomé +One of the smallest countries in Africa, but known for its rich cultural diversity. +Famous for its traditional voodoo practices, which originated in the region. +The country has stunning beaches along the Gulf of Guinea. + +Tonga:Nuku'alofa +An archipelago of 169 islands, known for its coral reefs and clear blue waters. +The only monarchy in the Pacific Islands. +Famous for its traditional Polynesian culture, including the Tongan tapa cloth. + +Trinidad and Tobago:Port of Spain +Known for its Carnival, one of the most vibrant and famous in the world. +A major producer of oil and natural gas in the Caribbean region. +Home to the largest natural asphalt deposit in the world, the Pitch Lake. + +Tunisia:Tunis +Famous for its ancient city of Carthage, once a major power in the Mediterranean. +Known for its Mediterranean coastline and historic medinas. +A key filming location for the Star Wars movies, with its desert landscapes. + +Turkey:Ankara +Straddles two continents, with parts of the country in both Europe and Asia. +Home to famous landmarks like the Hagia Sophia and the ancient city of Troy. +Known for its rich cuisine, including kebabs, baklava, and Turkish coffee. + +Turkmenistan:Ashgabat +Home to the "Door to Hell," a burning natural gas crater in the Karakum Desert. +One of the most secretive and least-visited countries in the world. +Known for its vast reserves of natural gas. diff --git a/data/project/facts/u.txt b/data/project/facts/u.txt new file mode 100644 index 0000000..a22dda3 --- /dev/null +++ b/data/project/facts/u.txt @@ -0,0 +1,35 @@ + +Uganda:Kampala +Home to Lake Victoria, the largest lake in Africa. +Known for its mountain gorillas, which can be seen in Bwindi Impenetrable National Park. +Referred to as the "Pearl of Africa" due to its stunning landscapes and biodiversity. + +Ukraine:Kyiv +Known for its rich cultural history, including its Orthodox churches and monasteries. +Home to the Chernobyl Exclusion Zone, site of the 1986 nuclear disaster. +One of the largest countries in Europe by land area. + +United Arab Emirates:Abu Dhabi +Known for its ultra-modern cities, including Dubai, home to the world’s tallest building, the Burj Khalifa. +One of the wealthiest nations in the world, largely due to its oil reserves. +Famous for its luxury shopping, futuristic architecture, and vibrant nightlife. + +United Kingdom:London +A major global center of finance, culture, and politics. +Home to famous landmarks such as Buckingham Palace, Big Ben, and the Tower of London. +Made up of four countries: England, Scotland, Wales, and Northern Ireland. + +United States:Washington, D.C. +One of the largest and most diverse countries in the world by population. +Famous for its cultural influence, including Hollywood, Silicon Valley, and Wall Street. +Home to iconic landmarks like the Statue of Liberty, the Grand Canyon, and the White House. + +Uruguay:Montevideo +One of the most progressive countries in South America, known for its strong social policies. +Famous for its beach-lined coast, particularly the resort town of Punta del Este. +The country’s national soccer team has won the FIFA World Cup twice, in 1930 and 1950. + +Uzbekistan:Tashkent +Home to ancient Silk Road cities like Samarkand, Bukhara, and Khiva. +Famous for its stunning Islamic architecture, including blue-domed mosques and mausoleums. +One of the world’s largest producers of cotton. diff --git a/data/project/facts/v.txt b/data/project/facts/v.txt new file mode 100644 index 0000000..4d8ceb5 --- /dev/null +++ b/data/project/facts/v.txt @@ -0,0 +1,20 @@ + +Vanuatu:Port Vila +An archipelago of 83 islands in the South Pacific Ocean. +Known for its active volcanoes, particularly Mount Yasur on Tanna Island. +Famous for being one of the happiest countries in the world, according to the Happy Planet Index. + +Vatican City:Vatican City +The smallest country in the world, both in size and population. +The spiritual and administrative center of the Roman Catholic Church. +Home to St. Peter’s Basilica and the Sistine Chapel, with its famous ceiling painted by Michelangelo. + +Venezuela:Caracas +Home to Angel Falls, the world’s tallest uninterrupted waterfall. +One of the most biodiverse countries in the world, with habitats ranging from mountains to rainforests. +Known for its vast oil reserves, among the largest in the world. + +Vietnam:Hanoi +Known for its stunning natural landscapes, including Ha Long Bay, a UNESCO World Heritage site. +Famous for its rich history, including the Vietnam War and ancient temples. +One of the world’s largest exporters of coffee and rice. diff --git a/data/project/facts/y.txt b/data/project/facts/y.txt new file mode 100644 index 0000000..f31bc8c --- /dev/null +++ b/data/project/facts/y.txt @@ -0,0 +1,5 @@ + +Yemen:Sana'a +One of the oldest centers of civilization in the Middle East, with history dating back over 3,000 years. +Home to the ancient skyscraper city of Shibam, a UNESCO World Heritage site. +Has been facing a prolonged humanitarian crisis due to ongoing conflict and instability. diff --git a/data/project/facts/z.txt b/data/project/facts/z.txt new file mode 100644 index 0000000..6d9762e --- /dev/null +++ b/data/project/facts/z.txt @@ -0,0 +1,10 @@ + +Zambia:Lusaka +Home to Victoria Falls, one of the largest and most famous waterfalls in the world. +Known for its national parks and wildlife, including the Big Five game animals. +One of the world’s largest producers of copper. + +Zimbabwe:Harare +Home to the Great Zimbabwe Ruins, a UNESCO World Heritage site and ancient city. +Famous for its diverse wildlife and national parks, including Hwange and Mana Pools. +Once known as the "Breadbasket of Africa" due to its fertile lands and agricultural output. diff --git a/src/code/ca/bcit/comp2522/lab09/WordList.java b/src/code/ca/bcit/comp2522/lab09/WordList.java index 0455171..13b9849 100644 --- a/src/code/ca/bcit/comp2522/lab09/WordList.java +++ b/src/code/ca/bcit/comp2522/lab09/WordList.java @@ -50,7 +50,9 @@ public class WordList */ public String getRandomWord() { - final Random rand = new Random(); + final Random rand; + + rand = new Random(); return this.wordList.get(rand.nextInt(this.wordList.size())); } diff --git a/src/code/ca/bcit/comp2522/project/Country.java b/src/code/ca/bcit/comp2522/project/Country.java deleted file mode 100644 index 386f66a..0000000 --- a/src/code/ca/bcit/comp2522/project/Country.java +++ /dev/null @@ -1,25 +0,0 @@ -package ca.bcit.comp2522.project; - -import java.util.Arrays; - -/** - * Country class - * - * @author Braeden Sowinski - * @version 1.0.0 - */ -public class Country { - final String name; - final String capitalCityName; - final String[] facts; - - Country( - final String name, - final String capitalCityName, - final String[] facts - ) { - this.name = name; - this.capitalCityName = capitalCityName; - this.facts = facts; - } -} diff --git a/src/code/ca/bcit/comp2522/project/Main.java b/src/code/ca/bcit/comp2522/project/Main.java deleted file mode 100644 index c64aee2..0000000 --- a/src/code/ca/bcit/comp2522/project/Main.java +++ /dev/null @@ -1,54 +0,0 @@ -package ca.bcit.comp2522.project; - -import java.util.Scanner; - -/** - * Main program entry to access a games menu - * - * @author Braeden Sowinski - * @version 1.0.0 - */ -public class Main { - public static void main(final String[] args) { - final Scanner scanner; - - scanner = new Scanner(System.in); - - boolean run = true; - - do { - final String input; - - System.out.println("Select a game: "); - System.out.println("Word Game (W)"); - System.out.println("Number Game (N)"); - System.out.println("My Game (M)"); - System.out.println("Quit (Q)"); - System.out.print("> "); - - input = scanner.nextLine().toUpperCase(); - - switch (input) { - case "W": - System.out.println("Word game..."); - break; - case "N": - System.out.println("Number game..."); - break; - case "M": - System.out.println("My game..."); - break; - case "Q": - System.out.println("Quitting..."); - run = false; - break; - default: - System.out.println("Invalid input: " + input); - break; - } - - } while (run); - - scanner.close(); - } -} diff --git a/src/tests/ca/bcit/comp2522/project/ScoreTest.java b/src/tests/ca/bcit/comp2522/project/ScoreTest.java new file mode 100644 index 0000000..6a78d0d --- /dev/null +++ b/src/tests/ca/bcit/comp2522/project/ScoreTest.java @@ -0,0 +1,141 @@ +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class ScoreTest { + + private static final String SCORE_FILE = "test_score.txt"; + private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + + @BeforeEach + void setUp() throws IOException { + // Clear the score file before each test to ensure no leftover data + new FileWriter(SCORE_FILE, false).close(); + } + + @Test + void testScoreCalculation() { + // Testing score calculation based on correct first and second attempts + Score score = new Score(LocalDateTime.now(), 1, 6, 2, 1); // 6 first attempts (2 points each), 2 second attempts (1 point each) + assertEquals(14, score.getScore(), "Score should be 14 points (6 * 2 + 2 * 1)"); + } + + @Test + void testToStringFormat() { + // Testing the formatting of the toString() method + LocalDateTime dateTime = LocalDateTime.now(); + Score score = new Score(dateTime, 1, 6, 2, 1); + + String expected = String.format( + "Date and Time: %s\nGames Played: 1\nCorrect First Attempts: 6\nCorrect Second Attempts: 2\nIncorrect Attempts: 1\nScore: 14 points\n", + dateTime.format(formatter) + ); + + assertEquals(expected, score.toString(), "The toString format should match the expected format."); + } + + @Test + void testAppendAndRetrieveLargeNumberOfScores() throws IOException { + // Create 25 scores and write them to the file + for (int i = 0; i < 25; i++) { + Score score = new Score(LocalDateTime.now(), 1, i + 1, (i % 3) + 1, (i % 2) + 1); + Score.appendScoreToFile(score, SCORE_FILE); + } + + // Read scores from the file + List scores = Score.readScoresFromFile(SCORE_FILE); + + // Validate the number of scores and their content + assertEquals(25, scores.size(), "Twenty-five scores should have been read from the file."); + for (int i = 0; i < 25; i++) { + int expectedScore = ((i + 1) * 2) + ((i % 3) + 1); + assertEquals(expectedScore, scores.get(i).getScore(), "Score for entry " + i + " should match the calculated value."); + } + } + + @Test + void testCheckForNewHighScore() throws IOException { + // Create some initial scores and add them to the file + Score score1 = new Score(LocalDateTime.now(), 1, 6, 2, 1); // 14 points + Score score2 = new Score(LocalDateTime.now(), 1, 9, 1, 0); // 19 points + Score.appendScoreToFile(score1, SCORE_FILE); + Score.appendScoreToFile(score2, SCORE_FILE); + + // Add a new score that is NOT a high score + Score score3 = new Score(LocalDateTime.now(), 1, 7, 2, 1); // 16 points + Score.appendScoreToFile(score3, SCORE_FILE); + + // Read scores from the file + List scores = Score.readScoresFromFile(SCORE_FILE); + + // Verify the highest score is still 19 + int highScore = scores.stream().mapToInt(Score::getScore).max().orElse(0); + assertEquals(19, highScore, "The highest score should still be 19 points."); + } + + @Test + void testNewHighScore() throws IOException { + // Create some initial scores and add them to the file + Score score1 = new Score(LocalDateTime.now(), 1, 6, 2, 1); // 14 points + Score score2 = new Score(LocalDateTime.now(), 1, 9, 1, 0); // 19 points + Score.appendScoreToFile(score1, SCORE_FILE); + Score.appendScoreToFile(score2, SCORE_FILE); + + // Add a new score that IS a high score + Score score3 = new Score(LocalDateTime.now(), 1, 10, 1, 0); // 21 points + Score.appendScoreToFile(score3, SCORE_FILE); + + // Read scores from the file + List scores = Score.readScoresFromFile(SCORE_FILE); + + // Verify the highest score is now 21 + int highScore = scores.stream().mapToInt(Score::getScore).max().orElse(0); + assertEquals(21, highScore, "The highest score should now be 21 points."); + } + + @Test + void testAppendAndCheckMultipleReads() throws IOException { + // Create initial scores and add them to the file + for (int i = 0; i < 5; i++) { + Score score = new Score(LocalDateTime.now(), 1, 5 + i, 1, 1); // Variable scores + Score.appendScoreToFile(score, SCORE_FILE); + } + + // Perform the first read + List scores1 = Score.readScoresFromFile(SCORE_FILE); + assertEquals(5, scores1.size(), "There should be 5 scores after the first write and read."); + + // Add more scores to the file + for (int i = 5; i < 10; i++) { + Score score = new Score(LocalDateTime.now(), 1, 5 + i, 1, 1); // Variable scores + Score.appendScoreToFile(score, SCORE_FILE); + } + + // Perform the second read + List scores2 = Score.readScoresFromFile(SCORE_FILE); + assertEquals(10, scores2.size(), "There should be 10 scores after the second write and read."); + } + + @Test + void testEmptyScoreFile() throws IOException { + // Test reading from an empty score file, should return an empty list + List scores = Score.readScoresFromFile(SCORE_FILE); + assertTrue(scores.isEmpty(), "Reading from an empty file should return an empty list."); + } + + @AfterEach + void tearDown() { + // Clean up by deleting the test score file after each test + new File(SCORE_FILE).delete(); + } +}