Skip to content

Commit d50bf71

Browse files
trying to fix some intellij warnings
1 parent b4fe93d commit d50bf71

37 files changed

+126
-126
lines changed

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: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
term,definition,creationDate,flashcardId,belongsToId
2-
test card 1,the first test card,2022-11-13T15:32:26.666982800,0,0
3-
test card 2,the second test card,2022-11-13T15:32:27.666982800,1,0
4-
test card 3,the third test card,2022-11-13T15:32:28.666982800,2,0
5-
alphabetical order checker,to test if alphabetical order is working,2022-11-13T15:32:29.666982800,3,0
6-
Term A,Definition A,2022-11-13T15:32:26.666982800,10,2
7-
Term B,Definition B,2022-11-13T15:32:27.666982800,11,2
8-
Term C,Definition C,2022-11-13T15:32:28.666982800,12,2
9-
Term D,Definition D,2022-11-13T15:32:29.666982800,13,2
10-
Term E,Definition E,2022-11-13T15:32:29.666982800,14,2
11-
Term F,Definition F,2022-11-13T15:32:29.666982800,15,2
12-
Term G,Definition G,2022-11-13T15:32:29.666982800,16,2
13-
Term H,Definition H,2022-11-13T15:32:29.666982800,17,2
14-
Term I,Definition I,2022-11-13T15:32:29.666982800,18,2
15-
Term J,Definition J,2022-11-13T15:32:29.666982800,19,2
16-
Same Term,Same Definition,2022-11-13T15:32:29.666982800,20,2
17-
Same Term,Same Definition,2022-11-13T15:32:29.666982800,21,2
2+
"test card 1","the first test card",2022-11-13T15:32:26.666982800,0,0
3+
"test card 2","the second test card",2022-11-13T15:32:27.666982800,1,0
4+
"test card 3","the third test card",2022-11-13T15:32:28.666982800,2,0
5+
"alphabetical order checker","to test if alphabetical order is working",2022-11-13T15:32:29.666982800,3,0
6+
"Term A","Definition A",2022-11-13T15:32:26.666982800,10,2
7+
"Term B","Definition B",2022-11-13T15:32:27.666982800,11,2
8+
"Term C","Definition C",2022-11-13T15:32:28.666982800,12,2
9+
"Term D","Definition D",2022-11-13T15:32:29.666982800,13,2
10+
"Term E","Definition E",2022-11-13T15:32:29.666982800,14,2
11+
"Term F","Definition F",2022-11-13T15:32:29.666982800,15,2
12+
"Term G","Definition G",2022-11-13T15:32:29.666982800,16,2
13+
"Term H","Definition H",2022-11-13T15:32:29.666982800,17,2
14+
"Term I","Definition I",2022-11-13T15:32:29.666982800,18,2
15+
"Term J","Definition J",2022-11-13T15:32:29.666982800,19,2
16+
"Same Term","Same Definition",2022-11-13T15:32:29.666982800,20,2
17+
"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/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,

src/main/java/entities/MultipleChoiceQuestion.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ public String getQuestion() {
8383
return question;
8484
}
8585

86-
/**
87-
* Sets the question.
88-
* @param question the question
89-
*/
90-
public void setQuestion(String question) {
91-
this.question = question;
92-
}
93-
9486
/**
9587
* Sets the choices.
9688
* @return the choices

src/main/java/frameworks_and_drivers/components/CreateFlashcardPanel.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
* @author Junyu Chen
1515
*/
1616
public class CreateFlashcardPanel extends JPanel implements ActionListener {
17-
CreateFlashcardController controller;
18-
JTextArea term_text, definition_text;
19-
JLabel existing_term, existing_definition;
20-
JFrame fcCMain;
17+
final CreateFlashcardController controller;
18+
final JTextArea term_text;
19+
final JTextArea definition_text;
20+
final JLabel existing_term;
21+
final JLabel existing_definition;
22+
final JFrame fcCMain;
2123

2224
public CreateFlashcardPanel(CreateFlashcardController controller, JFrame fcCMain) {
2325
//Initiating all the sub panels.

0 commit comments

Comments
 (0)