Skip to content

Commit

Permalink
Merge pull request #108 from yeapcl/brach-yeapcl-Documentation
Browse files Browse the repository at this point in the history
Brach yeapcl documentation
  • Loading branch information
tammykoh authored Oct 28, 2020
2 parents edb0a84 + be666a5 commit b7eab89
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
19 changes: 18 additions & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Developer Guide

## Design & implementation
## 1. Table of content
**1. Setting Up**\
**2. Design**

## 2. Design

### 2.1 Architecture
The **Architecture Diagram** below shows a high-level design of WhereGotTime. The design is based
on multi-tier architecture where the processing, UI, logic and data management are separated. The upper
tiers make use of services provided by lower tiers.

![](team/Overall Architecture.PNG)


## 3. Design & implementation

### Add Function

Expand Down Expand Up @@ -46,6 +60,9 @@ while the other two will result in the app giving an error message
prompting the user to re-enter again.<br/>

### Edit Function<br/>
Class Diagram

![](team/ClassDiagram_EditCommand.png)<br/>

### Delete Function<br/>

Expand Down
Binary file added docs/team/Overall Architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/java/seedu/duke/command/LogInCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void execute(UserList users, Ui ui, User nowUser/*, Storage storage*/) th

for (int i = 1; i <= users.getTotalUserCount(); i++) {
if (parsedInputs[0].equals((users.getUser(i)).getName())) {
if (parsedInputs[1].equals((users.getUser(i)).getPassWord())) {
if (parsedInputs[1].equals((users.getUser(i)).getPassword())) {
currentUser = users.getUser(i);
//System.out.println(parsedInputs[0] + " == " + (users.getUser(i)).getName());
doesExist = true;
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/seedu/duke/command/TestCommand.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package seedu.duke.command;

import seedu.duke.exception.DukeException;
import seedu.duke.timetable.Timetable;
import seedu.duke.ui.Ui;
import seedu.duke.user.User;
import seedu.duke.user.UserList;
import seedu.duke.task.Event;
import seedu.duke.storage.Storage;

import javax.sound.midi.SysexMessage;
import java.sql.Array;
import java.sql.Time;
import java.util.ArrayList;
import java.util.Arrays;

public class TestCommand extends Command {

Expand All @@ -28,7 +23,7 @@ public void execute(UserList users, Ui ui, User nowUser/*, Storage storage*/) th

String currentUserName = nowUser.getName();
System.out.println("currentUserName: " + currentUserName);
String currentUserPW = nowUser.getPassWord();
String currentUserPW = nowUser.getPassword();
System.out.println("currentUserPW: " + currentUserPW + "\n");


Expand All @@ -47,7 +42,7 @@ public void execute(UserList users, Ui ui, User nowUser/*, Storage storage*/) th
System.out.println("\nPrint each user's timetable information:");
for (User k : users.getUserList()) {
ArrayList<ArrayList<Event>> allTimeTable = k.combineAllTimetable();
System.out.println((k.getName() + " | " + k.getPassWord()));
System.out.println((k.getName() + " | " + k.getPassword()));
printAllTimeTable(allTimeTable);
System.out.println("###");
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/seedu/duke/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

public class User {
protected String name;
protected String passWord;
protected String password;
protected Timetable timetable;
protected String encipheredPassword;

public User(String name, String passWord) {
this.name = name;
this.passWord = passWord;
this.password = passWord;
this.timetable = new Timetable();
this.encipheredPassword = Cryptography.encipherPassword(passWord);
}
Expand All @@ -22,8 +22,8 @@ public String getName() {
return name;
}

public String getPassWord() {
return passWord;
public String getPassword() {
return password;
}

public String getEncipheredPassword() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/seedu/duke/user/UserListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ void getUserByName_getsProperly() {

users.addUser(user);

assertEquals("123123", (users.getUserByName("man").passWord));
assertEquals("123123", (users.getUserByName("man").password));
}
}
4 changes: 2 additions & 2 deletions text-ui-test/EXPECTED-UNIX.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ ____________________________________________________________
Hello Alex!
____________________________________________________________
____________________________________________________________
Noted. I have removed this class from your time table:
Noted. I have removed this class from your timetable:
CS2040C Tut COM1-2 1300-1400
Now you have 2 class(es) for mon in the time table.
Now you have 2 class(es) for mon in the timetable.
____________________________________________________________
____________________________________________________________
Noted. I have removed this class from your fri timetable:
Expand Down

0 comments on commit b7eab89

Please sign in to comment.