Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 26 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,38 @@
# Project #1 - Library Project using Dart
## About Project 1:

Congratulations on reaching the project phase! This project will assess your ability to develop a "Library Project using Dart" with a Command Line Interface (CLI) to manage a library's book inventory and user interactions. Below are the key requirements and evaluation criteria:
### Library System is a application using Dart with a Command Line Interface (CLI) .
## Functions:
- Display All Books .
- Add books .
- Delete Book.
- Search books by ID.
- Buy a book .


## Description:

The "Library Project using Dart" is an exciting software application designed to efficiently manage a library's book inventory and streamline user interactions through a Command Line Interface (CLI). This capstone project provides you, as a student, with an excellent opportunity to apply your knowledge and skills in Flutter Development, showcasing your proficiency in Dart programming.

The primary goal of the project is to develop a user-friendly and efficient CLI that caters to both library staff and patrons. With this CLI, users can effortlessly query books, view the number of available copies, add new books to the library, delete books from the inventory, make book purchases, and receive detailed invoices after each purchase. Additionally, the project demands an essential feature - updating the number of book copies after a purchase is made to maintain accurate inventory records.

To begin, you will create a new Dart project, ensuring that the project structure is appropriately organized for a clean and manageable codebase. As you progress, it is crucial to write code that is clear, well-organized, and scalable, adhering to standard coding conventions to enhance code readability. Demonstrating your comprehensive understanding of programming concepts and techniques is essential for a successful outcome.

Your CLI should allow users to search for books by title, author, or category, providing a straightforward and accessible way to retrieve information about the library's collection. Implementing a method to add new books to the library with the appropriate updates to the book count will further enhance the system's usability.

Managing the library's inventory also involves implementing a method to delete books, ensuring smooth handling of cases where a book to be deleted does not exist. Facilitating book purchases through the CLI is another critical aspect, requiring you to decrease the number of book copies according to the books purchased and generate an informative invoice for the user.

As an extra credit opportunity, you can implement features such as displaying all book categories in the library, returning a list of books belonging to a selected category. Additionally, providing a method to count the number of purchased books will further showcase your skills.

The project must be written entirely in the Dart language and fully submitted through GitHub using version control (Git). Remember to create descriptive commits to showcase your progress and follow the provided guidelines for academic integrity.



## Minimum Requirements:

1. **Project Structure**: Create a new Dart project and organize its structure appropriately. Set up the necessary folders, files, and ensure a clean and organized project layout.

2. **Clean Code**: Write clear, well-organized, and scalable code. Use meaningful variable and function names, following standard coding conventions to improve code readability. Well-structured and easily maintainable code is essential.

3. **Applying Concepts**: Demonstrate a comprehensive understanding of programming concepts and techniques. Implement the CLI features with efficiency and correctness.

4. **Query Books**: Develop a simple CLI user interface that allows users to query books and view the number of available copies. Users should be able to search for books by title, author, or category.

5. **Add New Book**: Provide a method to add a new book to the library and update the number of book copies accordingly. Ensure proper error handling for invalid inputs.

6. **Delete Book**: Implement a method to delete a book from the library and update the book count. Handle cases where the book to be deleted does not exist.

7. **Purchase**: Implement the purchase process, allowing users to buy books from the library. Ensure that the number of book copies is decreased according to the books purchased.

8. **Invoice**: Display a detailed invoice after the purchase, showing the books purchased, their prices, and the total cost.

9. **Editing Capability**: Add the ability to modify book data, such as title, author, and price. Users should be able to update book information easily.

## Ideas for Extra Credit:

- **Display all Book Categories**: Provide a method to display a list of all book categories in the library. When a category is selected, return a list of all books belonging to that category.
- **Reporting:** Provide a method to present a report that contains the number of all purchased books from the library, and calculate their amount.
-----------
#### We have a data of books stored in a file MyBooks.dart :

![Screenshot 2023-07-30 200313](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/feb329e8-f938-486e-be6a-4b7328a12250)

## Delivery Requirements:

- **Language**: The project should be written in Dart language.

- **GitHub Submission**:
- Create a Fork from the exam’s GitHub repository.
- Create a new branch with your name, i.e., Nawaf-Alshawan.
- Commit frequently with descriptive messages to show your progress.
- Finally, create a Pull Request to the exam’s original repository containing your solution.

- **README.md File**: Include a README.md file with instructions on how to run and test the project. This file should provide a clear guide for users to understand how to interact with the CLI.

- **Screenshots**: Include relevant screenshots of the app to showcase its appearance and functionalities. Visuals can help users understand the app's design and layout.

## Schedule & Deadlines:

- Exam Start Date: 27/7/2023 - 3:00 PM
- Exam Submission Deadline: 30/7/2023 – 11:59 PM

## Evaluation Criteria:

The project will be evaluated based on the following criteria:
#### Output:
#### Menu for Library Management :
![menu](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/633bb15e-b997-4c83-a37f-8620998fc94c)

- **Completion**: The extent to which the project meets all the minimum requirements, including the extra credit ideas if implemented.
### 1) Show All Book :
![Display All Books](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/d5c16675-da4b-4d09-8af2-85251a8f1e00)

- **Quality**: The overall quality of the project, including the coding style, organization, and ease of maintenance. Well-structured and readable code will be favorably evaluated.
### 2) Add Book :
![Add Book](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/0cdca57e-a1fa-4518-8597-641bfb905175)

- **Use of Programming Concepts**: How well you utilize programming concepts such as classes, abstracts, functions, and other relevant techniques.
- after adding :
![Display data of add book](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/4aecf317-75be-44fe-8731-0d571ce66125)

## Resources
### 3) Delete Book :
![delete Book By Ib](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/43b2cc38-8925-4d76-b61f-771020839aa7)

- [Dart Tutorials](https://dart.dev/tutorials)
### 4 ) Search Book by Id:
![Search Book by Id](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/9dd95aa0-9640-4f64-8024-fbdd0f075ebd)

Good luck with the project, and feel free to ask any additional questions if needed!
### 5) Buy a book :
![Buy a book](https://github.com/AbrarSaud/Project-dart-1/assets/109272922/f773907e-5269-4481-abcd-29ee12780391)
3 changes: 3 additions & 0 deletions project1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
3 changes: 3 additions & 0 deletions project1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
2 changes: 2 additions & 0 deletions project1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
Binary file added project1/access/Add Book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project1/access/Buy a book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project1/access/Display All Books.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project1/access/Display data of add book.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project1/access/Search Book by Id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project1/access/delete Book By Ib.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project1/access/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions project1/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
34 changes: 34 additions & 0 deletions project1/bin/myBooks.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
final myBooks = [
{ "id": 101,
"name": "The-Little-Prince",
"author": "Antoine de Saint-Exupery",
"amount" : 10 ,
"price": 100.0
},
{
"id": 102,
"name": "Little-women",
"author": "Louisa May Alcott",
"amount" : 8 ,
"price": 100.0
},
{ "id": 103,
"name": "The-Name-Jar",
"author": "Yangsook Choi",
"amount" : 3 ,
"price": 80.0
},
{
"id": 104,
"name": "Goodnight-Good-Dog",
"author": "Mary Lyn Ray ",
"amount" : 6 ,
"price": 50.0
},
{
"id": 105,
"name": "The-Cat-In-The-Hat",
"author": "Dr. Seuss ",
"amount" : 1,
"price": 30.0
},];
Loading