Skip to content

Commit 6ec83c8

Browse files
Merge pull request #99 from CSC207-2022F-UofT/Anthony's_Branch
Anthony's branch
2 parents 3c0051a + d50bf71 commit 6ec83c8

40 files changed

+116
-113
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/data/FlashcardSets.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ title,description,isPrivate,flashcardSetId,ownerUsername,flashcardIds
22
"test set 1","for testing study use case",false,0,testUser,0,1,2,3
33
"empty test set","for testing study use case with empty set",true,1,testUser
44
"Long Test Set","Insert Generic Description",false,2,Anthony,10,11,12,13,14,15,16,17,18,19,20,21
5+
"CSC207 Final Exam Prep","Prepare for the CSC207 final exam with this flashcard set.",false,3,csc207,22,23,24,25,26,27,28,29,30,31,32,33,34,35

src/data/Flashcards.csv

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,17 @@ term,definition,creationDate,flashcardId,belongsToId
1515
"Term J","Definition J",2022-11-13T15:32:29.666982800,19,2
1616
"Same Term","Same Definition",2022-11-13T15:32:29.666982800,20,2
1717
"Same Term","Same Definition",2022-11-13T15:32:29.666982800,21,2
18+
"Entity","A basic bit of data that we are storing in our program.",2022-12-03T21:52:27.507373800,22,3
19+
"Factory","An object that knows how to make a class instance typically by calling a constructor.",2022-12-03T21:52:47.933762600,23,3
20+
"Use case","Something a user wants to do with the program.",2022-12-03T21:53:04.556680900,24,3
21+
"Input boundary","The public interface for calling the use case.",2022-12-03T21:53:17.541271200,25,3
22+
"Interactor","The class that runs the use case (a subclass of the input boundary).",2022-12-03T21:53:34.172732200,26,3
23+
"Repository","The persistence mechanism (a subclass of the gateway).",2022-12-03T21:53:49.101677400,27,3
24+
"Gateway","The methods the repository needs to implement for the interactor to do its job.",2022-12-03T21:54:03.276713900,28,3
25+
"Controller","The object that the UI asks to run a use case.",2022-12-03T21:54:14.308815800,29,3
26+
"Presenter","The object that tells the UI what to do when a use case finishes.",2022-12-03T21:54:26.957394100,30,3
27+
"Downcasting","Casting the type of a variable into its subclass.",2022-12-03T21:55:06.381100300,31,3
28+
"Upcasting","Casting the type of a variable into its superclass.",2022-12-03T21:55:16.940754800,32,3
29+
"Private","Can only be accessed by code within the same class.",2022-12-03T21:55:28.372671100,33,3
30+
"Protected","Can only be accessed by code within the same class or within a class derived from the original.",2022-12-03T21:55:42.829787700,34,3
31+
"Variable shadowing","The same variable name is used in two different scopes.",2022-12-03T21:56:00.916802500,35,3

src/data/Users.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ username,password,isAdmin,flashcardSetIds
22
jempio,ilovejempio,false
33
ducas,badpassword,false
44
Anthony,123456,false,2
5+
csc207,csc207,false,3
56
testUser,password,false,0,1
67
adminUser,pass,true

src/main/java/create_flashcard_set_use_case/CreateFlashcardSetInteractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
public class CreateFlashcardSetInteractor implements CreateFlashcardSetInputBoundary {
3030
DBGateway dbGateway;
3131
IFlashcardSetDataAccess flashcardSetDataAccess; // for testing
32-
CreateFlashcardSetOutputBoundary createFlashcardSetOutputBoundary;
33-
FlashcardSetFactory flashcardSetFactory;
32+
final CreateFlashcardSetOutputBoundary createFlashcardSetOutputBoundary;
33+
final FlashcardSetFactory flashcardSetFactory;
3434

3535
/**
3636
* Constructs the use case interactor.

src/main/java/create_flashcard_use_case/CreateFlashcardInteractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* @author Junyu Chen
1010
*/
1111
public class CreateFlashcardInteractor implements CreateFlashcardInputBoundary {
12-
CreateFlashcardOutputBoundary presenter;
13-
DBGateway gateway;
12+
final CreateFlashcardOutputBoundary presenter;
13+
final DBGateway gateway;
1414

1515
/**
1616
* Create CreateFlashcardInteractor

src/main/java/delete_flashcard_set_use_case/DeleteFlashcardSetInteractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020
public class DeleteFlashcardSetInteractor implements DeleteFlashcardSetInputBoundary {
2121

22-
DBGateway dbGateway;
22+
final DBGateway dbGateway;
2323

24-
DeleteFlashcardSetOutputBoundary outputBoundary;
24+
final DeleteFlashcardSetOutputBoundary outputBoundary;
2525

2626
/**
2727
* Constructs the use case interactor.

src/main/java/delete_flashcard_use_case/DeleteFlashcardInteractor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
public class DeleteFlashcardInteractor implements DeleteFlashcardInputBoundary {
13-
DeleteFlashcardOutputBoundary presenter;
14-
DBGateway gateway;
13+
final DeleteFlashcardOutputBoundary presenter;
14+
final DBGateway gateway;
1515

1616
/**
1717
* Create DeleteFlashcardInteractor.

src/main/java/delete_flashcard_use_case/DeleteFlashcardResponseModel.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
* @author Junyu Chen
99
*/
1010
public class DeleteFlashcardResponseModel {
11-
LocalDateTime DeleteDate;
12-
String term, cardSetTitle;
11+
final LocalDateTime DeleteDate;
12+
String term;
13+
final String cardSetTitle;
1314

1415
public DeleteFlashcardResponseModel(LocalDateTime delete, String term, String cardSetTitle) {
1516
this.DeleteDate = delete;

src/main/java/entities/Flashcard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class Flashcard {
77
private String definition;
88
private final LocalDateTime creationDate;
99
private final int flashcardId;
10-
private int belongsToId;
10+
private final int belongsToId;
1111

1212

1313
public Flashcard(String term, String definition, LocalDateTime creationDate,

0 commit comments

Comments
 (0)