TIC2002 (2019)
  • Full Timeline
  • Week 1 [Aug 12]
  • Week 2 [Aug 19]
  • Week 3 [Aug 26]
  • Week 4 [Sep 2]
  • Week 5 [Sep 9]
  • Week 6 [Sep 16]
  • Week 7 [Sep 30]
  • Week 8 [Oct 7]
  • Week 9 [Oct 14]
  • Week 10 [Oct 21]
  • Week 11 [Oct 28]
  • Week 12 [Nov 4]
  • Week 13 [Nov 11]
  • Textbook
  • Admin Info
  • Report Bugs
  • Forum
  • Announcements
  • File Submissions
  • repl.it link
  • Java Coding Standard
  • Duke repo
  • Week 3 [Aug 26] - Tasks

    1. Install Intellij IDEA before the lecture
    2. Setup Duke project on your computer during/after the lecture
    3. Submit weekly exercises
    4. Implement project increments Level-1, Level-2

    1 Intellij IDEA before the lecture

    • See the panel below:

    Relevant: [Admin Tools → Intellij IDEA ]

     

    Intellij IDEA

    We'll be using Intellij IDE for programming. While using Intellij is not compulsory, there will be no help/instructions given for other IDEs.

    Install Intellij on your computer. You may use the Community Edition (free) or the Ultimate Edition (free for students).

    2 Setup Duke project on your computer during/after the lecture

    1. Learn about the Duke project

    Relevant: [Admin Project ]

     
    • The project is to be done individually.
    • The project based on a generic project called Duke.
    • In the project, you will build a small chatbot, using Java.
    • The project is to be done in small increments. You will be given a schedule of what increments to be done in each week.
    • Some weekly increments will be common to all students, while some will vary from student to student. That means your final product will be unique in terms of total features, but some features will be common to other students in the class.

    Duke - Overview

    Project Duke

    Duke, the Java Mascot
    [credit: Wikipedia]

    Project Duke is a educational software project designed to take you through the steps of building a small software incrementally, while applying as many Java and SE techniques as possible along the way.

    The project aims to build a product named Duke, a Personal Assistant Chatbot that helps a person to keep track of various things. The name Duke was chosen as a placeholder name, in honor of Duke, the Java Mascot. You may give it any other name or personality you wish.

    Here is a sample interaction with Duke:

        ____________________________________________________________
          ____        _        
         |  _ \ _   _| | _____ 
         | | | | | | | |/ / _ \
         | |_| | |_| |   <  __/
         |____/ \__,_|_|\_\___|
    
         Hello! I'm Duke
         What can I do for you?
        ____________________________________________________________
    
    list
        ____________________________________________________________
         Here are the tasks in your list:
         1.[T][✓] read book
         2.[D][✗] return book (by: June 6th)
         3.[E][✗] project meeting (at: Aug 6th 2-4pm)
         4.[T][✓] join sports club
        ____________________________________________________________
    
    todo borrow book
        ____________________________________________________________
         Got it. I've added this task: 
           [T][✗] borrow book
         Now you have 5 tasks in the list.
        ____________________________________________________________
    
    
    deadline return book /by Sunday
        ____________________________________________________________
         Got it. I've added this task: 
           [D][✗] return book (by: Sunday)
         Now you have 6 tasks in the list.
        ____________________________________________________________
    
    done 2
        ____________________________________________________________
         Nice! I've marked this task as done: 
           [D][✓] return book (by: June 6th)
        ____________________________________________________________
    
    blah
        ____________________________________________________________
         ☹ OOPS!!! I'm sorry, but I don't know what that means :-(
        ____________________________________________________________
    
    bye
        ____________________________________________________________
         Bye. Hope to see you again soon!
        ____________________________________________________________
    
    

    The project consists of the following increments:

    • Levels: A series of features, meant to be added to Duke in the given order, although some can be skipped. These have been named Level 1 to Level 10 to indicate how the features make the product progressively "level up".
    • Extensions:
      • Category A These are internal/feature enhancements meant to help you practice a specific Java or an SE technique.
      • Category B These are enhancements related to task tracking.
      • Category C These are enhancements, not specifically related to task tracking.
      • Category D Each of these adds the ability to track another type of entities.

    1. Fork https://github.com/nus-tic2002-2019/duke.
    2. Clone the fork onto your computer.
    3. Set up the project in your IDE as explained in the README file. Follow the Setting up section only. Do not do the tutorials.

    3 Submit weekly exercises

    • As usual, submit weekly programming exercise.

    4 Implement Duke increments Level-1, Level-2

    • Implement the following increments in the given order.
      • Commit code at important points. Minimally, commit after completing each increment.
      • After completing each increment,
        • Optionally, git tag the commit with the exact increment ID e.g., Level-2, A-TextUiTesting
        • git push the code to your fork
    Level-1: Greet, Echo, Exit

    Level 1. Greet, Echo, Exit

    In this initial skeletal version of Duke, it starts by greeting the user, simply echos commands entered by the user, and exits when the user types bye.
    Example:

        ____________________________________________________________
         Hello! I'm Duke
         What can I do for you?
        ____________________________________________________________
    
    list
        ____________________________________________________________
         list
        ____________________________________________________________
    
    blah
        ____________________________________________________________
         blah
        ____________________________________________________________
    
    bye
        ____________________________________________________________
         Bye. Hope to see you again soon!
        ____________________________________________________________
    
    
    • The indentation and horizontal lines are optional.
    Level-2: Add, List

    Level 2. Add, List

    Add the ability to store whatever text entered by the user and display them back to the user when requested.

    Example:

        ____________________________________________________________
         Hello! I'm Duke
         What can I do for you?
        ____________________________________________________________
    
    read book
        ____________________________________________________________
         added: read book
        ____________________________________________________________
    
    return book
        ____________________________________________________________
         added: return book
        ____________________________________________________________
    
    list
        ____________________________________________________________
         1. read book
         2. return book
        ____________________________________________________________
    bye
        ____________________________________________________________
         Bye. Hope to see you again soon!
        ____________________________________________________________
    
    
    • There is no need to save the data to the hard disk.
    • Assume there will be no more than 100 tasks. If you wish, you may use a fixed size array (e.g., String[100]) to store the items.