Project 2

§1 Project 2 #

The new bookstore inventory software has proven to be significantly more efficient than the old pencil-and-ledger method the owner relied on before. Now, you’ve been tasked with developing version 2 of the software to add additional functionality.

§2 Info #

For this project, you will continue working with the code you wrote for project 1. You are free to refactor any part of your code, including restarting from scratch if you prefer. You have the flexibility to implement this project in any way that meets the rubric requirements. Like the previous project, your grade will be based solely on your ability to fulfill the requirements.

The new Magazine data described below must be stored within a class, with a minimum of 2 member functions included as part of the class. You may refactor the rest of your program in any way you see fit.

You are not limited in what C++ features you can use for your implementation, you may use classes, member functions, and any other C++ features for this project. However, you may not import any external libraries that are not already included in the standard library (this means no libraries downloaded from the internet such as boost or sqlite).

Be aware that your source code will be shown to the rest of the class, as we will perform a “code review” of your project implementation.

This project will be accompanied by a short write up, you will be asked to write briefly about what you changed between project 1 and project 2, what problems you encountered, and why you choose the approach you implemented.

You will not have an opportunity to resubmit your project once graded, However you can ask questions or share code with me before submission. Please reach out if you have any questions.

§3 Guidelines #

You may use a single file or multiple files for your source code.

You may utilize any combination of containers to represent the data in your program, this could include classes, arrays, vectors, lists, etc.

magazine entries must be implemented as part of a class, where each magazine is represented by a single object. You must also utilize encapsulation (private data members) and implement at least 2 member functions as part of the magazine class. Any other details about the implementation and how it is stored is up to you.

§4 New Features #

Here is list of new features that you will need to implement, in addition to several existing features:

  1. The bookstore also sells magazines, magazines are loaded from a separate magazines.csv file. the magazine data MUST be implemented as part a class with private data members. The magazine file is in a similar format to the books.csv file, but with slightly different attributes:
    • ID, title, edition, issue, year published, month published, price, pagecount, genre, summary
    • The ID of the magazines should be any unique integer greater than existing Book ID’s, all Magazine and Book ID’s must be distinct. Your approach must work when loading a larger dataset such as from books-alt.csv.
    • Magazines must be able to be sold by ID like books, and must also show up in any queries alongside books, such as filtering by price or searching by title.
    • Magazines with the same title may come in many different issues/editions, each magazine variant will have a unique ID.
  2. Books now support an additional attribute: edition, Books may come in two editions: hardcover and paperback
    • This attribute is added as a new column on the books.csv file, you will need to adjust your csv-reader code to load this new metadata.
  3. To accommodate the new metadata, the output format when printing book/magazine information has been updated:
    • The new long-form output format is: ID | Type (Book or Magazine) | Title | remaining metadata... | Copies
    • Books:
      ID: 10 | Type: Book | Title: War and Peace | Author: J.R.R. Tolkien | Price: $20.67 | Year Published: 1954 | Page Count: 111 | Genre: Science Fiction | Summary: A thriller about a quest for hidden secrets and historical mysteries. | Edition: paperback | Copies: 3
      
    • Magazines:
      ID: 31 | Type: Magazine | Title: Culinary Trends | Edition: 12 | Issue: 78 | Year Published: 2023 | Month Published: October | Price: $5.49 | Page Count: 96 | Genre: Cooking | Summary: Exploring innovative recipes and the future of plant-based cuisine around the world. | Copies: 4
      
    • The new short-form output is: ID; Type; Title; Author(If book); Edition(If magazine); Issue(If magazine); Year Published; Copies
    • Books: ID; Type; Title; Author; Year Published; Copies
      9; Book; War and Peace; Leo Tolstoy; 1869; 2
      
    • Magazines: ID; Type; Title; Edition; Issue; Year Published; Copies
      17; Magazine; Culinary Trends; 12th; 78; 2023; 5
      
  4. New filtering criteria:
    • Able to filter only magazines or books
    • Able to filter books by specific edition (paperback or hardcover)
    • Able to display only the newest issue of a given magazine
  5. New filtering combos:
    • Able to find all magazines of a specific edition and name, such as “Culinary Trends,11th edition”
    • Able return all books published between two dates
    • Able to filter all books by a specific author in a specific edition, such as paperback books by Suzanne Collins
  6. Perform a sale of groups of items by criteria/filter:
    • Able to sell all magazines of a specific title and edition, such as all versions of “Culinary Trends,11th edition”
    • Able to sell a copy of all books published between two dates
    • Selling books or magazines involves the following:
      • Checks that at least one copy of the item is in the inventory.
        • Print an error message such as: “ERROR: 0 copies of <ITEM SHORT FORM INFO> available” when there are no copies of the item in the inventory, stop the function at this point.
      • Updates the inventory to remove a copy from the number of available items.
      • Log purchases to a file: save the short-form output for the item,with the price at time of sale at the end of the line, to a file called sales.txt.
        • use the short-form format with the price appended: Type; Title; Author(If book); Edition(If magazine); Issue(If magazine); Year Published; Copies; $PRICE (dont forget the currency sign)
      • Print confirmation text to the console that the sale succeeded: SOLD: <ITEM SHORT FORM INFO>
  7. Limitations:
    • You MUST define a class and store magazines as individual objects, using private data members and implementing at least 2 member functions, you may continue to use a struct to store books, or you may refactor the Book struct to be part of any class.

I encourage you to use class member functions along with external member functions where you feel it is appropriate.

There are a lot of requirements to fulfill here, Think about how you can reuse logic across different parts of your program so that you can do more work with less code.

§5 Test Case #

You will implement your program with the following test case in your main() function:

§6 Grading Rubric #

100% possible for a perfect implementation

Penalties:

I will also substitute your main() function to test your function implementations with different inputs, for example: updating the parameters for your price filtering function to find all books that cost more than $2.

§7 Inputs #

You will use the provided books.csv and magazines.csv to load data for your program. I have also provided an additional books-alt.csv which can be used as an extra test dataset to check your program.

§8 Starter Code #

I have provided a sample-main.cpp which only contains an example structure for your main() function, you will use your source code from project 1 as a starting point for this project.

§9 Output #

The Completed project should have the following output (some completed sections may have no output):

NOTE: the order of any list in this output is NOT mandatory, other than the two sections for printing an alphabetized list of items.

=== 1. Load the list of books from `bookFile` ===

=== 2. Load the list of magazines from `magazineFile` ===

=== 3. Print short-form information of the first book in the list (ID=0) ===
0; Book; To Kill a Mockingbird; Harper Lee; 1960; 1

=== 4. Print the full information of *any* Magazine in the list ===
ID: 17 | Type: Magazine | Title: Culinary Trends | Edition: 12th | Issue: 78 | Year Published: 2023 | Month Published: October | Price: $5.49 | Page Count: 96 | Genre: Cooking | Summary: Exploring innovative recipes and the future of plant-based cuisine around the world. | Copies: 5

=== 5. Print the full list of books in short-form format ===
0; Book; To Kill a Mockingbird; Harper Lee; 1960; 1
1; Book; 1984; George Orwell; 1949; 5
2; Book; Pride and Prejudice; Jane Austen; 1813; 2
3; Book; The Great Gatsby; F. Scott Fitzgerald; 1925; 3
4; Book; Moby Dick; Herman Melville; 1851; 4
5; Book; Brave New World; Aldous Huxley; 1932; 10
6; Book; The Catcher in the Rye; J.D. Salinger; 1951; 3
7; Book; Crime and Punishment; Fyodor Dostoevsky; 1866; 0
8; Book; The Hobbit; J.R.R. Tolkien; 1937; 8
9; Book; War and Peace; Leo Tolstoy; 1869; 2
10; Book; The Lord of the Rings: The Fellowship of the Ring; J.R.R. Tolkien; 1954; 3
11; Book; The Lord of the Rings: The Two Towers; J.R.R. Tolkien; 1954; 7
12; Book; The Lord of the Rings: The Return of the King; J.R.R. Tolkien; 1955; 5
13; Book; The Hunger Games; Suzanne Collins; 2008; 4
14; Book; Catching Fire; Suzanne Collins; 2009; 3
15; Book; Mockingjay; Suzanne Collins; 2010; 0
16; Book; The Ballad of Songbirds and Snakes; Suzanne Collins; 2020; 5

=== 6. Print the full list of magazines in short-form format ===
17; Magazine; Culinary Trends; 12th; 78; 2023; 5
18; Magazine; Culinary Trends; 12th; 77; 2023; 7
19; Magazine; Culinary Trends; 12th; 76; 2023; 5
20; Magazine; Culinary Trends; 12th; 75; 2023; 7
21; Magazine; Culinary Trends; 11th; 74; 2022; 3
22; Magazine; Culinary Trends; 11th; 73; 2022; 4
23; Magazine; Culinary Trends; 11th; 72; 2022; 2
24; Magazine; Scientific Wonders; 4th; 17; 2023; 3
25; Magazine; Scientific Wonders; 4th; 18; 2023; 9
26; Magazine; Scientific Wonders; 4th; 19; 2023; 1
27; Magazine; Scientific Wonders; 4th; 20; 2023; 4
28; Magazine; Scientific Wonders; 5th; 24; 2024; 2
29; Magazine; Scientific Wonders; 5th; 23; 2024; 6
30; Magazine; Scientific Wonders; 5th; 22; 2024; 9
31; Magazine; Scientific Wonders; 5th; 21; 2024; 2
32; Magazine; Global Affairs Weekly; 3rd; 14; 2024; 4
33; Magazine; Adventure Traveler; 9th; 57; 2022; 2
34; Magazine; Retro Gaming Monthly; 2nd; 21; 2024; 5
35; Magazine; Fashion Forward; 6th; 43; 2023; 1
36; Magazine; Health and Fitness Focus; 8th; 32; 2023; 8
37; Magazine; History Digest; 4th; 19; 2022; 8
38; Magazine; Home & Garden Inspirations; 15th; 65; 2023; 8
39; Magazine; Business Leadership Insights; 7th; 10; 2024; 3
40; Magazine; Life; 1st; 1; 1936; 1

=== 7. Print the latest edition of the magazine 'Scientific Wonders' short-form format ===
28; Magazine; Scientific Wonders; 5th; 24; 2024; 2

=== 8. Print list in short-form format of all items that cost more than '$17.00' ===
9; Book; War and Peace; Leo Tolstoy; 1869; 2
16; Book; The Ballad of Songbirds and Snakes; Suzanne Collins; 2020; 5
40; Magazine; Life; 1st; 1; 1936; 1

=== 9. Print list in short-form format of all items that belong to the 'Fantasy' genre ===
8; Book; The Hobbit; J.R.R. Tolkien; 1937; 8
10; Book; The Lord of the Rings: The Fellowship of the Ring; J.R.R. Tolkien; 1954; 3
11; Book; The Lord of the Rings: The Two Towers; J.R.R. Tolkien; 1954; 7
12; Book; The Lord of the Rings: The Return of the King; J.R.R. Tolkien; 1955; 5

=== 10. Print list in short-form format of all magazines with the title 'Culinary Trends', and are '11th' edition ===
21; Magazine; Culinary Trends; 11th; 74; 2022; 3
22; Magazine; Culinary Trends; 11th; 73; 2022; 4
23; Magazine; Culinary Trends; 11th; 72; 2022; 2

=== 11. Print list in short-form format of all items published between '1900' and '1950' ===
1; Book; 1984; George Orwell; 1949; 5
3; Book; The Great Gatsby; F. Scott Fitzgerald; 1925; 3
5; Book; Brave New World; Aldous Huxley; 1932; 10
8; Book; The Hobbit; J.R.R. Tolkien; 1937; 8
40; Magazine; Life; 1st; 1; 1936; 1

=== 12. Print list in short-form format of all 'paperback' Books authored by 'Suzanne Collins' ===
13; Book; The Hunger Games; Suzanne Collins; 2008; 4
14; Book; Catching Fire; Suzanne Collins; 2009; 3
15; Book; Mockingjay; Suzanne Collins; 2010; 0

=== 13. Print list in short-form format of all items whose titles contain the text 'and' ===
2; Book; Pride and Prejudice; Jane Austen; 1813; 2
7; Book; Crime and Punishment; Fyodor Dostoevsky; 1866; 0
9; Book; War and Peace; Leo Tolstoy; 1869; 2
16; Book; The Ballad of Songbirds and Snakes; Suzanne Collins; 2020; 5
36; Magazine; Health and Fitness Focus; 8th; 32; 2023; 8

=== 14. Print list in short-form format of all 'hardcover' Books ===
0; Book; To Kill a Mockingbird; Harper Lee; 1960; 1
1; Book; 1984; George Orwell; 1949; 5
5; Book; Brave New World; Aldous Huxley; 1932; 10
10; Book; The Lord of the Rings: The Fellowship of the Ring; J.R.R. Tolkien; 1954; 3
11; Book; The Lord of the Rings: The Two Towers; J.R.R. Tolkien; 1954; 7
12; Book; The Lord of the Rings: The Return of the King; J.R.R. Tolkien; 1955; 5
16; Book; The Ballad of Songbirds and Snakes; Suzanne Collins; 2020; 5

=== 15. Perform a 'sale' of all magazines with the title 'Culinary Trends', and are '11th' edition (remember to update 'sales.txt') ===
SOLD: Magazine; Culinary Trends; 11th; 74; 2022; 3
SOLD: Magazine; Culinary Trends; 11th; 73; 2022; 4
SOLD: Magazine; Culinary Trends; 11th; 72; 2022; 2

=== 16. Perform a 'sale' of all items published between '1900' and '1950' ===
SOLD: Book; 1984; George Orwell; 1949; 5
SOLD: Book; The Great Gatsby; F. Scott Fitzgerald; 1925; 3
SOLD: Book; Brave New World; Aldous Huxley; 1932; 10
SOLD: Book; The Hobbit; J.R.R. Tolkien; 1937; 8
SOLD: Magazine; Life; 1st; 1; 1936; 1

=== 17. Print the full info of all books in alphabetical order ===
ID: 1 | Type: Book | Title: 1984 | Author: George Orwell | Price: $9.99 | Year Published: 1949 | Page Count: 328 | Genre: Dystopian | Summary: A dystopian story about a totalitarian regime and surveillance. | Edition: hardcover | Copies: 4
ID: 5 | Type: Book | Title: Brave New World | Author: Aldous Huxley | Price: $11.99 | Year Published: 1932 | Page Count: 311 | Genre: Dystopian | Summary: A futuristic society controlled by technology and conditioning. | Edition: hardcover | Copies: 9
ID: 14 | Type: Book | Title: Catching Fire | Author: Suzanne Collins | Price: $11.99 | Year Published: 2009 | Page Count: 391 | Genre: Dystopian | Summary: After winning the Hunger Games Katniss Everdeen faces new dangers as a rebellion starts to take root. | Edition: paperback | Copies: 3
ID: 7 | Type: Book | Title: Crime and Punishment | Author: Fyodor Dostoevsky | Price: $14.99 | Year Published: 1866 | Page Count: 671 | Genre: Philosophical Fiction | Summary: A psychological exploration of morality and guilt. | Edition: paperback | Copies: 0
ID: 4 | Type: Book | Title: Moby Dick | Author: Herman Melville | Price: $12.5 | Year Published: 1851 | Page Count: 635 | Genre: Adventure | Summary: The tale of Captain Ahab's obsessive quest to kill the white whale Moby Dick. | Edition: paperback | Copies: 4
ID: 15 | Type: Book | Title: Mockingjay | Author: Suzanne Collins | Price: $12.99 | Year Published: 2010 | Page Count: 390 | Genre: Dystopian | Summary: Katniss becomes the symbol of rebellion as Panem descends into all-out war against the Capitol. | Edition: paperback | Copies: 0
ID: 2 | Type: Book | Title: Pride and Prejudice | Author: Jane Austen | Price: $8.99 | Year Published: 1813 | Page Count: 279 | Genre: Romance | Summary: A classic romance novel exploring themes of class and marriage. | Edition: paperback | Copies: 2
ID: 16 | Type: Book | Title: The Ballad of Songbirds and Snakes | Author: Suzanne Collins | Price: $19.99 | Year Published: 2020 | Page Count: 528 | Genre: Dystopian | Summary: The prequel to The Hunger Games series following the early years of President Snow during the 10th Hunger Games. | Edition: hardcover | Copies: 5
ID: 6 | Type: Book | Title: The Catcher in the Rye | Author: J.D. Salinger | Price: $10.99 | Year Published: 1951 | Page Count: 214 | Genre: Fiction | Summary: A story about teenage rebellion and alienation. | Edition: paperback | Copies: 3
ID: 3 | Type: Book | Title: The Great Gatsby | Author: F. Scott Fitzgerald | Price: $10.5 | Year Published: 1925 | Page Count: 180 | Genre: Fiction | Summary: A story about the mysterious Jay Gatsby and the American Dream. | Edition: paperback | Copies: 2
ID: 8 | Type: Book | Title: The Hobbit | Author: J.R.R. Tolkien | Price: $12.99 | Year Published: 1937 | Page Count: 310 | Genre: Fantasy | Summary: The adventures of Bilbo Baggins in Middle-earth. | Edition: paperback | Copies: 7
ID: 13 | Type: Book | Title: The Hunger Games | Author: Suzanne Collins | Price: $10.99 | Year Published: 2008 | Page Count: 374 | Genre: Dystopian | Summary: A young girl participates in a deadly televised competition. | Edition: paperback | Copies: 4
ID: 10 | Type: Book | Title: The Lord of the Rings: The Fellowship of the Ring | Author: J.R.R. Tolkien | Price: $13.99 | Year Published: 1954 | Page Count: 423 | Genre: Fantasy | Summary: The first part of the epic trilogy where Frodo begins his journey to destroy the One Ring. | Edition: hardcover | Copies: 3
ID: 12 | Type: Book | Title: The Lord of the Rings: The Return of the King | Author: J.R.R. Tolkien | Price: $13.99 | Year Published: 1955 | Page Count: 416 | Genre: Fantasy | Summary: The final part of the trilogy where the fate of Middle-earth is decided. | Edition: hardcover | Copies: 5
ID: 11 | Type: Book | Title: The Lord of the Rings: The Two Towers | Author: J.R.R. Tolkien | Price: $13.99 | Year Published: 1954 | Page Count: 352 | Genre: Fantasy | Summary: The second part of the trilogy following the separate journeys of the Fellowship members. | Edition: hardcover | Copies: 7
ID: 0 | Type: Book | Title: To Kill a Mockingbird | Author: Harper Lee | Price: $10.99 | Year Published: 1960 | Page Count: 281 | Genre: Fiction | Summary: A novel about racial injustice in the Deep South. | Edition: hardcover | Copies: 1
ID: 9 | Type: Book | Title: War and Peace | Author: Leo Tolstoy | Price: $18.99 | Year Published: 1869 | Page Count: 1225 | Genre: Historical Fiction | Summary: A sweeping narrative of Russian society during the Napoleonic era. | Edition: paperback | Copies: 2

=== 18. Print the full info for *all* magazines in alphabetical order, also sorted by latest issue first ===
ID: 33 | Type: Magazine | Title: Adventure Traveler | Edition: 9th | Issue: 57 | Year Published: 2022 | Month Published: April | Price: $6.25 | Page Count: 110 | Genre: Travel | Summary: Discover the most thrilling adventure destinations for 2022 from jungles to mountains. | Copies: 2
ID: 39 | Type: Magazine | Title: Business Leadership Insights | Edition: 7th | Issue: 10 | Year Published: 2024 | Month Published: March | Price: $9.99 | Page Count: 140 | Genre: Business | Summary: Exclusive interviews with top CEOs and entrepreneurs on leadership strategies. | Copies: 3
ID: 17 | Type: Magazine | Title: Culinary Trends | Edition: 12th | Issue: 78 | Year Published: 2023 | Month Published: October | Price: $5.49 | Page Count: 96 | Genre: Cooking | Summary: Exploring innovative recipes and the future of plant-based cuisine around the world. | Copies: 5
ID: 18 | Type: Magazine | Title: Culinary Trends | Edition: 12th | Issue: 77 | Year Published: 2023 | Month Published: September | Price: $5.49 | Page Count: 94 | Genre: Cooking | Summary: Discover unique global fusion recipes and the rise of sustainable cooking methods. | Copies: 7
ID: 19 | Type: Magazine | Title: Culinary Trends | Edition: 12th | Issue: 76 | Year Published: 2023 | Month Published: August | Price: $5.49 | Page Count: 98 | Genre: Cooking | Summary: A deep dive into seasonal summer ingredients and the art of grilling and smoking meats. | Copies: 5
ID: 20 | Type: Magazine | Title: Culinary Trends | Edition: 12th | Issue: 75 | Year Published: 2023 | Month Published: July | Price: $5.49 | Page Count: 10 | Genre: Cooking | Summary: Highlighting the growing trend of fermented foods and their health benefits. | Copies: 7
ID: 21 | Type: Magazine | Title: Culinary Trends | Edition: 11th | Issue: 74 | Year Published: 2022 | Month Published: December | Price: $5.49 | Page Count: 10 | Genre: Cooking | Summary: Exploring holiday baking techniques and modern twists on traditional holiday meals. | Copies: 2
ID: 22 | Type: Magazine | Title: Culinary Trends | Edition: 11th | Issue: 73 | Year Published: 2022 | Month Published: November | Price: $5.49 | Page Count: 97 | Genre: Cooking | Summary: Featuring comfort foods and innovative ways to prepare hearty warm dishes for cold months. | Copies: 3
ID: 23 | Type: Magazine | Title: Culinary Trends | Edition: 11th | Issue: 72 | Year Published: 2022 | Month Published: October | Price: $5.49 | Page Count: 96 | Genre: Cooking | Summary: A focus on the latest plant-based trends and tips for transforming traditional recipes. | Copies: 1
ID: 35 | Type: Magazine | Title: Fashion Forward | Edition: 6th | Issue: 43 | Year Published: 2023 | Month Published: June | Price: $6.75 | Page Count: 130 | Genre: Fashion | Summary: A sneak peek into the summer collections of top designers and emerging fashion icons. | Copies: 1
ID: 32 | Type: Magazine | Title: Global Affairs Weekly | Edition: 3rd | Issue: 14 | Year Published: 2024 | Month Published: July | Price: $4.99 | Page Count: 85 | Genre: Politics | Summary: Analysis of recent global diplomatic negotiations and their impact on international trade. | Copies: 4
ID: 36 | Type: Magazine | Title: Health and Fitness Focus | Edition: 8th | Issue: 32 | Year Published: 2023 | Month Published: February | Price: $5.99 | Page Count: 95 | Genre: Fitness | Summary: Tips on achieving optimal health and fitness with the latest in workout and diet trends. | Copies: 8
ID: 37 | Type: Magazine | Title: History Digest | Edition: 4th | Issue: 19 | Year Published: 2022 | Month Published: November | Price: $4.75 | Page Count: 105 | Genre: History | Summary: Investigating the untold stories of ancient civilizations and their hidden legacies. | Copies: 8
ID: 38 | Type: Magazine | Title: Home & Garden Inspirations | Edition: 15th | Issue: 65 | Year Published: 2023 | Month Published: May | Price: $6.5 | Page Count: 125 | Genre: Lifestyle | Summary: Innovative home design ideas and sustainable gardening tips for every space. | Copies: 8
ID: 40 | Type: Magazine | Title: Life | Edition: 1st | Issue: 1 | Year Published: 1936 | Month Published: November | Price: $1000 | Page Count: 96 | Genre: Photojournalism | Summary: The inaugural issue of Life magazine featuring groundbreaking photojournalism on world events. | Copies: 0
ID: 34 | Type: Magazine | Title: Retro Gaming Monthly | Edition: 2nd | Issue: 21 | Year Published: 2024 | Month Published: January | Price: $8.99 | Page Count: 90 | Genre: Entertainment | Summary: A nostalgic look back at classic video games and interviews with their creators. | Copies: 5
ID: 28 | Type: Magazine | Title: Scientific Wonders | Edition: 5th | Issue: 24 | Year Published: 2024 | Month Published: September | Price: $7.99 | Page Count: 120 | Genre: Science | Summary: A deep dive into the latest advancements in artificial intelligence and space exploration. | Copies: 2
ID: 29 | Type: Magazine | Title: Scientific Wonders | Edition: 5th | Issue: 23 | Year Published: 2024 | Month Published: August | Price: $7.99 | Page Count: 115 | Genre: Science | Summary: Exploring the mysteries of quantum computing and its potential impact on various industries. | Copies: 6
ID: 30 | Type: Magazine | Title: Scientific Wonders | Edition: 5th | Issue: 22 | Year Published: 2024 | Month Published: July | Price: $7.99 | Page Count: 125 | Genre: Science | Summary: A comprehensive look at recent advancements in renewable energy technologies and their global use. | Copies: 9
ID: 31 | Type: Magazine | Title: Scientific Wonders | Edition: 5th | Issue: 21 | Year Published: 2024 | Month Published: June | Price: $7.99 | Page Count: 118 | Genre: Science | Summary: The latest research on gene editing and its ethical implications in medicine and agriculture. | Copies: 2
ID: 27 | Type: Magazine | Title: Scientific Wonders | Edition: 4th | Issue: 20 | Year Published: 2023 | Month Published: December | Price: $7.99 | Page Count: 130 | Genre: Science | Summary: Breakthroughs in deep space exploration: Discoveries from the James Webb Space Telescope. | Copies: 4
ID: 26 | Type: Magazine | Title: Scientific Wonders | Edition: 4th | Issue: 19 | Year Published: 2023 | Month Published: November | Price: $7.99 | Page Count: 110 | Genre: Science | Summary: Cutting-edge robotics: How AI is transforming automated systems in industrial applications. | Copies: 1
ID: 25 | Type: Magazine | Title: Scientific Wonders | Edition: 4th | Issue: 18 | Year Published: 2023 | Month Published: October | Price: $7.99 | Page Count: 122 | Genre: Science | Summary: Delving into advancements in biotechnology and the future of organ regeneration. | Copies: 9
ID: 24 | Type: Magazine | Title: Scientific Wonders | Edition: 4th | Issue: 17 | Year Published: 2023 | Month Published: September | Price: $7.99 | Page Count: 119 | Genre: Science | Summary: Investigating breakthroughs in particle physics: What we've learned from the Large Hadron Collider. | Copies: 3

§10 Help #

I want you to do well, please message me on canvas, email, or join office hours if you feel lost or have any questions about the assignment or your implementation.

I am happy to answer questions or provide guidance to help you succeed.

§11 Extra Credit #

You can earn an additional 15% extra credit by solving this additional challenge: Implement a “fuzzy search” function.

A user may want to query for a title by name without typing the exact string, for example: Lord of rings tower would plausibly return The Lord of the Rings: The Two Towers. Your task is to implement a fuzzy_search(string input) function that takes a string, and returns the 5 most similar results.

You may use any algorithm to accomplish this, an obvious standout would be Levenshtein Distance https://en.wikipedia.org/wiki/Levenshtein_distance

The problem with a naive implementation of this is that a query like Lord of rings tower would rank Crime and Punishment as closer than The Lord of the Rings: The Two Towers, this can be addressed in several different ways, I leave that up to you.

Extra Credit Requirements:

§12 Submission #

Commit and sync your code just like any other assignment in this class.

Also submit a short write-up on Canvas, details are in the next section.

Be aware that your source code will be shown to the rest of the class, as we will perform a “code review” of your project implementation.

The Due Date and the Close Date for the project are strict, this project has more time than other assignments to complete, but is also expected to take more time than other assignments.

Late work will not be accepted. Due to how long projects take to grade, I cannot accept resubmissions out of a sake of fairness for all students.

Submit early to avoid the risk of receiving a low grade due to mistakes like missing code or write up.

§13 Deliverables #