Skip to content

Commit a14e18d

Browse files
committed
Package structure implemented
1 parent 632d8ef commit a14e18d

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/main/java/UserSearchUI.java renamed to src/main/java/Profile_screen/UserSearchUI.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
package Profile_screen; /**
22
* Provides the UI elements
33
*/
44
import javax.swing.*;
@@ -8,7 +8,7 @@
88
import java.io.File;
99

1010

11-
public class UserSearchUI implements UserPresenter{
11+
public class UserSearchUI implements UserPresenter {
1212
private JLabel label;
1313

1414
public UserSearchUI() {
@@ -32,7 +32,7 @@ public void actionPerformed(ActionEvent e) {
3232
frame.setVisible(true);
3333
}
3434

35-
// UserPresenter makes UI implement showProfile to invert the use-case --> UI dependency
35+
// User_search_IA.UserPresenter makes UI implement showProfile to invert the use-case --> UI dependency
3636
@Override
3737
public String showProfile(String username) {
3838
// setting up access to the database of users:
@@ -51,7 +51,7 @@ public String showProfile(String username) {
5151

5252
// for trying out the code:
5353
// public static void main(String[] args) {
54-
// new UserSearchUI();
54+
// new Profile_screen.UserSearchUI();
5555
//
5656
// }
5757

src/main/java/UserPresenter.java renamed to src/main/java/User_search_IA/UserPresenter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package User_search_IA;
2+
13
// UI implements this interface to invert the dependency of UI on the inner layers
24
public interface UserPresenter {
35
String showProfile(String username);

src/main/java/UserReader.java renamed to src/main/java/user_profile_display_use_case/UserReader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package user_profile_display_use_case;
2+
13
import java.io.File;
24

35
public class UserReader {

src/test/java/TestUserSearch.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import Profile_screen.UserSearchUI;
12
import org.junit.jupiter.api.Assertions;
23
import org.junit.jupiter.api.Test;
34

4-
import java.io.File;
5-
65
public class TestUserSearch {
76
@Test
87
public void TestShowUser() {

0 commit comments

Comments
 (0)