Git Product home page Git Product logo

twu-biblioteca-giamir's Introduction

Biblioteca Build Status Code Coverage

Installation Instructions

Clone from github and move into directory

$ [email protected]:giamir/twu-biblioteca-giamir.git
$ cd twu-biblioteca-giamir

You will need JDK 7 and Gradle installed on your machine to try the application.

Running tests

Testing Framework

junit-4.11
mockito-all-1.10.19
system-rules-1.16.0

To run the full test suite

$ gradle clean test

After you run the test suite you will have a compiled version of the app on this path

$ cd build/classes/main

You can now try the app from terminal

$ java com.twu.biblioteca.BibliotecaApp

Usage example

WELCOME TO BIBLIOTECA

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Sign In [SI]
 - Quit [Q]

Enter a menu command option: SI
Enter your library number: 123-4567
Enter your password: password1
Logged in successfully

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: UD
USER PROFILE DETAILS
Name: Giamir
Email: [email protected]
Phone: +44 0123 456789

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: LB
High Fidelity                  Nick Hornby                    1995
The Divine Comedy              Dante Alighieri                1320
The Decameron                  Giovanni Boccaccio             1353

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: COB
Enter title: The Divine Comedy
Enter author: Dante Alighieri
Enter year: 1320
Thank you! Enjoy the book

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: LB
High Fidelity                  Nick Hornby                    1995
The Decameron                  Giovanni Boccaccio             1353

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: RB
Enter title: The Divine Comedy
Enter author: Dante Alighieri
Enter year: 1320
Thank you for returning the book.

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: LB
High Fidelity                  Nick Hornby                    1995
The Divine Comedy              Dante Alighieri                1320
The Decameron                  Giovanni Boccaccio             1353

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Check Out Book [COB]
 - Check Out Movie [COM]
 - Return Book [RB]
 - Return Movie [RM]
 - Sign Out [SO]
 - User Details [UD]
 - Quit [Q]

Enter a menu command option: SO
Logged out successfully

MAIN MENU
 - List Books [LB]
 - List Movies [LM]
 - Sign In [SI]
 - Quit [Q]

Enter a menu command option: Q

Business Case

The Bangalore Public Library has approached us to design and implement a Library Management System for them. Based on their requirements, we have decided to develop a new system named Biblioteca. Since the library has a large list of requirements, we will be making multiple releases of Biblioteca, with each release incrementally adding more functionality.

In order to easily add more functionality in the future as well as maintain a high level of quality, Biblioteca will be built using a test driven approach.

The requirements for the first release of Biblioteca are given below.

User Stories (Release 1)

WELCOME MESSAGE
As a customer,
I would like to see a welcome message when I start the application,
so that I feel welcome and know that Biblioteca is available.

LIST BOOKS
As a customer,
after the welcome message appears I would like to see a list of all library books,
so that I can browse for books I might want to check-out.
Assume that there is a pre-existing list of books. You don't need to support adding or removing books from the library.

BOOK DETAILS
As a customer,
I'd like the list of all books to include each books Author and Year Published,
so that I can be confident that I have found the book I am looking for.
The book listing should have columns for this information.

MAIN MENU
As a customer,
instead of automatically seeing the book list,
I would like to see a list of options and be able to choose one.
For now, the only option should be 'List Books'. All future options should be added to this menu also.

INVALID MENU OPTION
As a customer,
I would like to be notified when I choose an invalid option with the message “Select a valid option!”,
so that I can know when I need to re-enter my choice.

QUIT
As a customer,
I would like to continue choosing options until I choose to 'Quit'.

CHECKOUT BOOK
As a librarian,
I would like customers to be able to check-out a book.
Checked out books should not appear in the list of all library books.

SUCCESSFUL CHECKOUT
As a customer,
I would like to know that a book has been checked out by seeing the message “Thank you! Enjoy the book”.

UNSUCCESSFUL CHECKOUT
As a customer,
I would like to be notified if the book I tried to check-out is not available by seeing the message “That book is not available.”,
so that I know that I need to select a different book or fix my spelling error.

RETURN BOOK
As a librarian,
I would like customers to be able to return a book,
so that other customers can check that book out.
Returned books should appear in the list of library books.

SUCCESSFUL RETURN
As a customer,
I would like to be notified if the book I am returning belongs to this library by seeing the message “Thank you for returning the book.”, so that I know I returned the book to the right library.

UNSUCCESSFUL RETURN
As a customer,
I would like to be notified if the book I am returning has not been added to this library by seeing the message “That is not a valid book to return.”,
so that I can return it to the correct library or fix my spelling error.

User Stories (Release 2)

LIST MOVIES
As a customer,
I would like to see a list of available movies,
so that I can browse for a movie that I might check-out.
Movies have a name, year, director and movie rating (from 1-10 or unrated).

CHECKOUT MOVIE
As a customer,
I would like to check out a movie from the library,
so I can enjoy it at home.

USER ACCOUNTS - LOGIN
As a librarian,
I want to know who has checked out a book,
so that I can hold them accountable for returning it.
Users must now login using their library number (which is in the format xxx-xxxx) and a password in order to check-out and return books.
User credentials are predefined, so registering new users is not part of this story.

USER ACCOUNTS - USER INFORMATION
As a customer,
I want to be able to see my user information (name, email address and phone number),
so that I know that the library can contact me.
This option should only be available when the customer is logged in and should only display that customer’s information.

Contributors

Giamir Buoncristiani

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.