Skip to content

[1차 VER1.0] Java ToyProject upload by ParkSeongWook #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions .idea/KDTBE5_Java_ToyProject.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions me.smartstore/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

public class Main {
public static void main(String[] args) {
SmartStoreApp.getInstance().test().run();
}
}
63 changes: 63 additions & 0 deletions me.smartstore/SmartStoreApp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

import customer.Customer;
import customer.Customers;
import group.Group;
import group.GroupType;
import group.Groups;
import group.Parameter;
import menu.*;

public class SmartStoreApp {
private final Groups allGroups = Groups.getInstance();
private final Customers allCustomers = Customers.getInstance();
private final MainMenu mainMenu = MainMenu.getInstance();

// singleton
private static SmartStoreApp smartStoreApp;

public static SmartStoreApp getInstance() {
if (smartStoreApp == null) {
smartStoreApp = new SmartStoreApp();
}
return smartStoreApp;
}

private SmartStoreApp() {}

public void details() {
System.out.println("\n\n===========================================");
System.out.println(" Title : SmartStore Customer Classification");
System.out.println(" Release Date : 23.05.10");
System.out.println(" Copyright 2023 Gyeongmin All rights reserved.");
System.out.println("===========================================\n");
}

public SmartStoreApp test() {
allGroups.add(new Group(new Parameter(10, 100000), GroupType.GENERAL));
allGroups.add(new Group(new Parameter(20, 200000), GroupType.VIP));
allGroups.add(new Group(new Parameter(30, 300000), GroupType.VVIP));

//고객 정보
for (int i = 0; i < 26; i++) {
allCustomers.add(new Customer(
Character.toString(
(char) ('a' + i)),
(char) ('a' + i) + "123",
((int) (Math.random() * 5) + 1) * 10,
((int) (Math.random() * 5) + 1) * 100000));
}

System.out.println("allCustomers = " + allCustomers);
System.out.println("allGroups = " + allGroups);

allCustomers.refresh(allGroups);

return this;
}

public void run() {
details();
mainMenu.manage();

}
}
13 changes: 13 additions & 0 deletions me.smartstore/arrays/Collections.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package arrays;

public interface Collections<T> {
int size();
T get(int index);
void set(int index, T object);
int indexOf(T object);
void add(T object);
void add(int index, T object);
T pop();
T pop(int index);
T pop(T object);
}
Loading