diff --git a/Functional_Design Diagrams/ArchitectureLayout_Context_Class_Component_Sequence_Diagrams.pdf b/FunctionalReq_TechnicalDesign_Diagrams/ArchitectureLayout_Context_Class_Component_Sequence_Diagrams.pdf similarity index 100% rename from Functional_Design Diagrams/ArchitectureLayout_Context_Class_Component_Sequence_Diagrams.pdf rename to FunctionalReq_TechnicalDesign_Diagrams/ArchitectureLayout_Context_Class_Component_Sequence_Diagrams.pdf diff --git a/Functional_Design Diagrams/Mobile_Storyboard.png b/FunctionalReq_TechnicalDesign_Diagrams/Mobile_Storyboard.png similarity index 100% rename from Functional_Design Diagrams/Mobile_Storyboard.png rename to FunctionalReq_TechnicalDesign_Diagrams/Mobile_Storyboard.png diff --git a/Functional_Design Diagrams/UseCase_ERD_Activity_Diagrams.pdf b/FunctionalReq_TechnicalDesign_Diagrams/UseCase_ERD_Activity_Diagrams.pdf similarity index 100% rename from Functional_Design Diagrams/UseCase_ERD_Activity_Diagrams.pdf rename to FunctionalReq_TechnicalDesign_Diagrams/UseCase_ERD_Activity_Diagrams.pdf diff --git a/QA_Test_Case_Spec/Test_Case_Spec (QA).pdf b/QA_Test_Case_Spec/Test_Case_Spec (QA).pdf new file mode 100644 index 0000000..3362b75 Binary files /dev/null and b/QA_Test_Case_Spec/Test_Case_Spec (QA).pdf differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..db36b10 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# CS4800 Software Engineering Project - Mobile App for Blockchain Class Project +Team: Hao Ming You, Lisa Chen, Johnson Wei, Laura Campos, Jin Kim + +## Description + +Completed in Spring 2019, the project was to teach the class about software engineering concepts and work on a large project using Blockchain. The goal was to create an application where a user can search a product by its ID/UPN, name, and/or supplier and find all the materials that make up the product. In addition, the user can also click on the components of the products to find more information about the component and its sub-components as well. + +The class is split to multiple teams of 3-5 where each team is responsible for different aspects of the project: API, Blockchain, Component Database, ERP, Mobile UI, and Desktop UI. Finally, all teams were to implement the project using Agile Methodology and create the following documentation: + +**Functional/Requirement Spec (BA)** +- Use Cases +- Activity Diagrams +- Domain Object Model or ER Diagram + +**Technical/Design Spec (DEV)** +- Context (Deployment) Diagram +- Architecture Layout +- Component Diagram +- Class Hierarchy & Relationship Diagrams +- Sequence Diagrams + +**Test Case Spec (QA)** +- Test Strategy/Approach +- Test Plan + - Traceability Matrix + - Test Cases +- Test Results Summary + +## Project Summary +Our team was responsible for Mobile UI where are code submission can be found here. We used Android Studio to implement the project and designed the program with the intention to be compatible with phones of various sizes up to Android Lollipop OS. The project is currently not running; the Blockchains that connect to the API that interfaces with our project are all taken down due to running costs and this being a short-term project. A test case was added to demonstrate how the application works. + +Furthermore, the team responsible for creating the Component Database never completed the work; thus, the code for handling components are commented out as it was not clear how the other team would implement the component search. + +A presentation summarizing the submission and our accomplishments can be found here: +https://docs.google.com/presentation/d/1BZ5TQUQB4ZD8J49dwPjfNIKykKk6N2N_kE85xPRMt_g/edit#slide=id.g5aed9f1e54_0_9 diff --git a/app/src/main/java/com/example/MediTrackerApp/SearchResultPage.java b/app/src/main/java/com/example/MediTrackerApp/SearchResultPage.java index bc416c5..895235d 100644 --- a/app/src/main/java/com/example/MediTrackerApp/SearchResultPage.java +++ b/app/src/main/java/com/example/MediTrackerApp/SearchResultPage.java @@ -35,6 +35,7 @@ /** * @author Lisa Chen and Ben You + * Lisa - only edited to add the API connection and data retrieval */ public class SearchResultPage extends AppCompatActivity { @@ -47,13 +48,6 @@ public class SearchResultPage extends AppCompatActivity { boolean asyncTaskDone = false; ArrayList currentArray; - - //Dummy data test 1. can remove once we get the official data. - String[] productSKUStringArray = {"0000000000000000000000","11111111111111111111112222222222222222222222222222222222222222","2","3","4","5"}; - String[] productNameStringArray = {"Computer","Pokemon","Tomogachi","Jojo's Bizarre Adventure: HOLY SHIT I GOTA SHIT TON OF TEXT I GATTA REWWWEKK", "Maple Story","Weed"}; - String[] supplierStringArray = {"Sensei","Ash","Ben","GIOGIO","Nexon","Snoop Dog"}; - - //These variables are to hold the information from the search parameter variables that passed over String productSKUString,productNameString,supplierNameString,blockChainIDString; @@ -80,8 +74,6 @@ protected void onCreate(Bundle savedInstanceState) { //Redirect's activityView to the called activity setContentView(R.layout.activity_search_result_page); - //Toolbar toolbar = findViewById(R.id.toolbar); - //Changes the actionbar Title getSupportActionBar().setTitle("Search Results:"); @@ -97,26 +89,20 @@ protected void onCreate(Bundle savedInstanceState) { //need to pass context (you can only retrieve during onCreate) context = getApplicationContext(); - // (!) Component Data + // Component Data ArrayList queryData = TestDataGenerator.getQueryData(context); ArrayList componentData = TestDataGenerator.getComponentData(context); ComponentTestGenerator test = new ComponentTestGenerator(); ArrayList testSamples = test.getTestProducts(); - //SearchResultPage itemlist populate + //SearchResultPage itemlist populate with test data if (queryData != null) { // populateScreenArray(queryData); } - //Component Data: store component stuff here and pass it to page 4. (searchresultexpanded) if (componentData != null) { for (Component item : componentData) { - /*Log.d("LisaUnitTest", "Name: " + item.getName() + ", ProductID: " + - item.getSKU() + ",Supplier: " + item.getSupplier()); - */ - //TODO this is for component data - a different screen - subCompProductNameArrayList.add(item.getName()); subCompProductIDArrayList.add(item.getSKU()); subCompSupplierArrayList.add(item.getSupplier()); @@ -126,14 +112,11 @@ protected void onCreate(Bundle savedInstanceState) { + " | arraysize: " +subCompProductNameArrayList.size()); } - System.out.println("(!!!!!!) STOP ADDING SHIT ===================================================="); } if (testSamples != null){ for (Component item : testSamples){ - - MedProduct parent = (MedProduct) item; System.out.println("-----> parent name: " +parent.getName()); @@ -142,15 +125,12 @@ protected void onCreate(Bundle savedInstanceState) { System.out.println(" ---> Size: " +item.getSubComponents().size()); //subCompProductNameArrayList.add(); - - } currentArray = testSamples; populateScreenArray(testSamples); } - //Gets the listview from searchresultpage listview = (ListView)findViewById(R.id.listView); @@ -178,7 +158,6 @@ public void onItemClick(AdapterView parent, View view, int position, long id) } }); - //ComponentTestGenerator test = new ComponentTestGenerator(); //ArrayList testSamples = test.getTestProducts(); } @@ -200,12 +179,9 @@ private void updateScreenArray(Intent intent, int position) { resetCompArrays(); populateComponentArray(subcomponents); - -// for (int i = 0; i < subcomponents.size(); i++) { - intent.putExtra("passComponentProductName", subCompProductNameArrayList); - intent.putExtra("passComponentProductSKU", subCompProductIDArrayList); - intent.putExtra("passComponentSupplierName", subCompSupplierArrayList); -// } + intent.putExtra("passComponentProductName", subCompProductNameArrayList); + intent.putExtra("passComponentProductSKU", subCompProductIDArrayList); + intent.putExtra("passComponentSupplierName", subCompSupplierArrayList); reassignProductArrayList(); } @@ -220,7 +196,6 @@ private void reassignProductArrayList() { * Populates the array that is displayed onto the UI with the MedProduct data. * @param data The data to display */ - //Product/SKU/Suppl;ier/OrderDate Data private void populateScreenArray(ArrayList data) { for (Component item : data) { MedProduct prod = (MedProduct) item; @@ -233,7 +208,6 @@ private void populateScreenArray(ArrayList data) { orderDateArrayList.add(prod.getOrderDate()); System.out.println("==Product Name: " +prod.getName()+" | productID: " +prod.getSKU() +" | ArraySize: " +productNameArrayList.size()+ " |subcomponent: " +prod.getSubComponents() ); - } System.out.println("======================================================"); @@ -247,14 +221,10 @@ private void populateComponentArray(ArrayList data) { subCompProductIDArrayList.add(item.getSKU()); subCompSupplierArrayList.add(item.getSupplier()); } - } - - @Override protected void onResume() { - super.onResume(); queryTask = new SearchTask(); @@ -263,15 +233,15 @@ protected void onResume() { //0=Etherium, 1=Hyper Ledger, 2=Open Chain //return 0 if user enters etherium - //TODO you still need to pass the blockchain reference from the dropdown - queryTask.execute("1", "ABC123", null, null); + //turned off because blockchain is taken down for the class project +// queryTask.execute("1", "ABC123", null, null); // don't populate data until it is complete // while (!asyncTaskDone); - while (productAPIResults == null); - if (productAPIResults != null) - populateScreenArray(productAPIResults); +// while (productAPIResults == null); +// if (productAPIResults != null) +// populateScreenArray(productAPIResults); } //CustomAdapter for the custom ListView Display (these methods are generated automatically to handle the custom ListView) diff --git a/app/src/main/java/com/example/MediTrackerApp/SearchResultsExpandedPage.java b/app/src/main/java/com/example/MediTrackerApp/SearchResultsExpandedPage.java index 3745a7c..88443a6 100644 --- a/app/src/main/java/com/example/MediTrackerApp/SearchResultsExpandedPage.java +++ b/app/src/main/java/com/example/MediTrackerApp/SearchResultsExpandedPage.java @@ -14,6 +14,7 @@ /** * @author Lisa Chen and Ben You + * Lisa added minor edit only to ensure product and its component info is passed to this page */ public class SearchResultsExpandedPage extends AppCompatActivity { @@ -68,23 +69,16 @@ protected void onCreate(Bundle savedInstanceState) { productSKUTextView.setText("Product ID: " +resultExpandedProductSKUString); suppplierNameTextView.setText("Supplier: " +resultExpandedSupplierString); - - //Ben --> //TODO: (1) Need to create another listview similar to the custom one i made for the compoment page. //TODO: (2) Maybe need to pass the arraylist of the Component page to here and display it. //TODO: (3) Will need to replace the productname/SKU/Supplier if they continue to click on it. ( // Use stack on the arraylist like if arraylist is empty then gtfo. - - - - //Laura --> //TODO: (4) Create a top-right menu bar that guides the user back to the search area. (will need to dispose data?) //TODO: (5) OPTIONAL: add a logout button or some shit. - //ListView Details: //Gets the listview from searchresultpage @@ -95,9 +89,6 @@ protected void onCreate(Bundle savedInstanceState) { //sets the listview to the custom adapter subcomponentListView.setAdapter(customAdapter); - - - } //CustomAdapter for the custom ListView Display (these methods are generated automatically to handle the custom ListView) @@ -142,26 +133,7 @@ public View getView(int position, View convertView, ViewGroup parent) { suppplierNameTextView.setText("Component Supplier: " +resultExpandedComponentSupplierString.get(position)); // } - - //System.out.println("String Array contents: " +productNameStringArray[position] + " | position#: " +position); - //System.out.println("--ArayList stuff: " + productNameArrayList.get(position)+" | arraylistContents: " +productNameArrayList.size()); - - //textview_name.setText(productNameString[0]=productSKUSting); - - return convertView; } } - - - /* - public boolean onOptionsItemSelected(MenuItem item){ - Intent myIntent = new Intent(this, SearchResultPage.class); - startActivityForResult(myIntent, 0); - return true; - }*/ - - - - }