Skip to content

Conversation

@Jemiiah
Copy link

@Jemiiah Jemiiah commented Feb 19, 2025

implemented a constructor for a struct that represents a Book. The Book has the following fields:

title: A string that represents the book's title
author: A string that represents the book's author.
year: An integer that represents the year the book was published.
likes: An integer that represents the number of likes the book has received. Default value is 0.
The constructor function, Book::new, should take three parameters (title, author, and year) and return a fully initialized Book`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant