PROJECT: Makan Book


Overview

Makan Book is a restaurant guide and application for diners in National University of Singapore (NUS). It allows users to write and view reviews for restaurants within NUS. Additionally, Users are able to interact with one another to create a more enjoyable experience.

Summary of contributions

  • Major Enhancement: Jio feature - the creation, deletion and joining of jios

    • What it does: Allows a user to create a public event (a jio). Other users can view a list of all jios (details and people going), and can join a jio, which will update the list of people going on the jio. The jio event can only be deleted by the creator.

    • Justification: This feature improves the product significantly by complementing the restaurant book (user can decide on a particular restaurant, and invite friends to eat there with him). It allows users to set an event (a Jio) to meet at a certain time and address. This is a public event, thus is free for all to see and join. However it is managed by the creator only, who can delete the jio once over.

    • Highlights: Works together with Group to create group jios.

  • Minor Enhancement: listJio command for listing all jios in the list panel

  • Minor Enhancement: created menubar for listing for other items

  • Minor Enhancement: created second list panel for displaying items other than restaurants (eg.debts, jios)

  • Code contributed: [here]

  • Other contributions:

    • Project management:

      • Deliverables and Deadline

      • Assigned issues and managed milestones and releases (Pull requests #309, #42)

    • Enhancements to existing features:

      • Updated the GUI for listing all items other than restaurant

      • Worked on browser panel displays

    • Documentation:

      • Adapted the developer’s guide to describe Makanbook

      • Bug fixes in user guide

    • Community:

      • Reported bugs and suggestions for other teams in the class (Examples: 1, 2, 3)

Contributions to the User Guide

Given below are sections I contributed to the User Guide.

Finding people to eat with: createJio

Users can find other users to eat with through inviting users. “createJio” creates a jio that is added to the global list of jios.
Format: createJio n/NAME w/WEEK d/DAY h/TIME a/PLACE [g/GROUP NAME]

  • Jio — an invitation to hang out.

  • Name, date, time, place must be provided. The other parameters are optional.

  • All users will be able to view the list of jios.

  • If group name is present, all group members are automatically added to jio. Jio is still visible to all.

Examples:

  • createJio n/MALA w/1 d/mon h/1200 a/FineFood

  • createJio n/saporeFriends w/1 d/mon h/1800 a/Sapore g/2103

Joining an existing jio: joinJio

Examples:

Users can join an existing jio to find people to eat with, without having to create one of their own.
Format: joinJio n/NAME

  • User has to indicate the name of the jio.

Examples:

  • joinJio n/MALA

Deleting old jios: deleteJio

Users can specify a jio to delete. Only the creator of a jio can delete the jio.
Format: deleteJio n/NAME

Examples:

  • deleteJio n/MALA

List jios: listJio

Lists all jios created by all users, so that user can see which one to join. Format: listJio

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide.

Added the class diagram for Jio into the Model class diagram: === Model component

ModelClassDiagramWithJio
Figure 1. Structure of the Model Component

API : Model.java

The Model,

  • stores a UserPref object that represents the user’s preferences.

  • stores the Address Book data.

  • exposes an unmodifiable ObservableList<Restaurant> that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.

  • does not depend on any of the other three components.

Detailed explanation of the implementation of Jio feature with UML sequence diagram: === Jio Feature ==== Current Implementation A Jio object stores information about the jio in the following objects: Name, Week, Day, Time, Address. The Jio object also stores the people going on the jio as a list of Username. A Jio object cannot be modified after creation, except to add a user (ie. append Username to the list). Jios are stored in the users.xml with each object as an Xml element.

Creator (current user) is automatically added to the jio. If the group tag g/ is added, users under the group specified is retrieved from UserData and added to the jio.

CreateJioCommandSequenceDiagram

createJio is implemented by creating a Jio object with the specified parameters, but an empty list of Username. The Jio object is eventually passed to ModelManager, which adds the current user to the Jio and stores it in UserData. Similarly, joinJio relies on ModelManager to add the current user to the jio. It also performs a check that the user is not already in the list of Username, otherwise a CommandException is thrown. All jio commands require the user to be logged in due to usage of current user, otherwise a NotLoggedInCommandException is thrown. joinJio and deleteJio perform additional checks for whether the Jio exists, otherwise a CommandException is thrown.

Reasons for this implementation

ModelManager exclusively handles all operations related to current user for encapsulation. Thus, the command classes do not touch current user at all, but pass Jio objects on to ModelManager.

Alternatives Considered

Aspect: Storing jio
  • Alternative 1 (current choice): Jios are stored separately.

    • Pros: Easy to implement.

    • Pros: Easy to retrieve jio from storage by searching for jio name.

    • Pros: Jio can listed easily.

    • Cons: Jio creator needs to be stored as an additional attribute if needed.

  • Alternative 2: Storing jios in User.

    • Pros: A jio can be identified by its creator

    • Cons: Difficult to list jios. Need to iterate through users.

    • Cons: Hard to retrieve a particular jio.

Aspect: Storing people going on jio
  • Alternative 1 (current choice): List of Username.

    • Pros: Easy to implement and list.

    • Cons: Users must have unique usernames.

  • Alternative 2: Storing a list of User instead.

    • Pros: All information about User is stored for possible retrieval in the future (eg. to view user timetables).

    • Cons: Difficult to store in Xml file. Users cannot easily be converted in to a single string.

    • Cons: May be storing unnecessary information.

Test cases for manual testing: === Create a jio

  1. Create a jio with vaild parameters

    1. Prerequisites: User is logged in as chelchia. A jio of the same name has not already been created

      1. Test case: createJio n/manualtestjio w/1 d/mon h/1200 a/FineFood
        Expected: New jio added: manualtestjio Date: [NUS Week: 1 Day:mon Time:1200] Address: FineFood People: chelchia

  2. Create a group jio with valid parameter

    1. Prerequisites: User is logged in as chelchia. A group 2103 exists

      1. Test case: createJio n/groupjio w/1 d/mon h/1200 a/FineFood g/2103
        Expected: New jio added: groupjio Date: [NUS Week: 1 Day:mon Time:1200] Address: FineFood People: chelchia navekom meena567 aiden katespades

  3. Create a jio with same jio name

    1. Prerequisites: User is logged in.

      1. Test case: createJio n/manualtestjio w/1 d/mon h/1200 a/FineFood
        Expected: A jio with the same name already exists

Join a jio

  1. Join a valid jio

    1. Prerequisites: User is logged in. User is not creator of jio.

      1. Test case: joinJio n/manualtestjio
        Expected: Jio joined: manualtestjio

  2. Join a non-existent jio

    1. Prerequisites: User is logged in.

      1. Test case: joinJio n/randomjio
        Expected: This jio does not exist

Delete jio

  1. Delete a valid jio user created

    1. Prerequisites: User is logged in. User is creator of jio.

      1. Test case: deleteJio n/manualtestjio
        Expected: Jio deleted: manualtestjio

  2. Delete a valid jio not created by user

    1. Prerequisites: User is logged in. User is not creator of jio.

      1. Test case: deleteJio n/manualtestjio
        Expected: You are not the creator of this jio. Only the creator can delete a jio.

  3. Join a non-existent jio

    1. Prerequisites: User is logged in.

      1. Test case: deleteJio n/randomjio
        Expected: Jio does not exist.