diff --git a/.gitignore b/.gitignore index 0a282d2..ef6b112 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,18 @@ +<<<<<<< HEAD +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.idea/misc.xml +.idea/vcs.xml +.idea/ +======= .DS_Store out/ .idea/ *.class +>>>>>>> f65afd48d6a35cc3dd48a7d1be184d2c702667fb diff --git a/AndroidGroceryStore b/AndroidGroceryStore new file mode 160000 index 0000000..70542f5 --- /dev/null +++ b/AndroidGroceryStore @@ -0,0 +1 @@ +Subproject commit 70542f5c4038f9653a498f37824ae490d7d537dc diff --git a/GroceryStore.iml b/GroceryStore.iml deleted file mode 100644 index c90834f..0000000 --- a/GroceryStore.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 9a86fe5..0000000 --- a/README.md +++ /dev/null @@ -1,64 +0,0 @@ -C4Q Access 3.3 Grocery Store - -We are going to be building a Grocery store. The store will have 8 sections, each manned by a separate team of high tech grocery connoisseurs, which happen to also be your pair programming groups. Wisely, the team has decided to model the grocery store interactions in software before building an actual location. - -All groups will build a class that represents their section of the store. The class must implement the interface that is provided for you. When we run the program, a Customer will browse through several sections of the store, and finally proceed to checkout, where all information will be displayed. - -Each group will be responsible for the following sections of the store: - -#Checkout -Instructor - Responsible for collection all information from the Grocery Cart, and displaying it to the customer. - -#Bakery -Group 1 - Responsible for a medley of cakes, each with various toppings -* Stack of BakedGood -* Enum Type { Pie, Cake, Brownie} -* BakedGood { enum Type, int slicesPerUnit) - - -#Butcher -Group 2 - Responsible for a selection of meats, and various cuts of each -* Stack of Meat -* Enum Animal { Cow, Pig, Goat} -* Enum Cut { Flank, Shoulder } -* Meat{ enum Animal, enum Cut} - -#Cold Case -Group 3 - Responsible for an assortment of lunch meats, each with a suggested recipe and ingredients list -* Stack of ChilledItem -* Enum Type { Drink, Snack} -* ChilledItem { enum Type, int temp) - -#Hot Bar -Group 4 - Responsible for variety of prepared meals, each with a weight, and price per unit -* Stack of HotFood -* Enum Type { Sweet, Savory, Spicy} -* HotFood { enum Type, int servesHowMany) - -#Pizzeria -Group 5 - Responsible for several prepared pizzas, each with a fixed amount available and price per slice -* Stack of PizzaSlice -* Enum Type { Pepperoni, Sausage, Cheese} -* Enum Crust { Thin, Regular, Cheese } -* PizzaSlice { enum Type, enum Crust) - -#Frozen Food Aisle -Group 6 - Responsible for a diverse array of frozen food items -* Stack of FrozenFood -* Enum Appliance { microwave, toaster oven} -* FrozenFood{ enum Appliance, int Time } - -#Sushi -Group 7 - Responsible for an amalgamation of prepared sushi rolls, each with an fixed amount available and price per roll. -* Stack of SushiRoll -* Enum Type { Salmon, Tuna, Snapper} -* Enum Sauce { Wasabi, Soy } -* SushiRoll{ enum Type, enum Sauce } - - -#Bagels -Group 8 - Responsible for hot Bagels -* Stack of Bagel -* Enum Browning { Light, Dark, Burnt} -* enum Spreads {Cream cheese, jelly, butter, Cheese} -* Bagel { enum Browning, enum Spreads} diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..ba6d0f6 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 24 + buildToolsVersion "24.0.1" + + defaultConfig { + applicationId "nyc.c4q.grocerystore" + minSdkVersion 16 + targetSdkVersion 24 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + testCompile 'junit:junit:4.12' + compile 'com.android.support:appcompat-v7:24.2.0' + compile 'com.android.support:recyclerview-v7:24.2.0' +} diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..39fbe12 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Users/jonathanjohnson/Library/Android/sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/app/src/androidTest/java/nyc/c4q/grocerystore/ApplicationTest.java b/app/src/androidTest/java/nyc/c4q/grocerystore/ApplicationTest.java new file mode 100644 index 0000000..0b9fc17 --- /dev/null +++ b/app/src/androidTest/java/nyc/c4q/grocerystore/ApplicationTest.java @@ -0,0 +1,13 @@ +package nyc.c4q.grocerystore; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0aca908 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/nyc/c4q/demonstrations/Calculator.java b/app/src/main/java/nyc/c4q/demonstrations/Calculator.java new file mode 100644 index 0000000..6ef85c2 --- /dev/null +++ b/app/src/main/java/nyc/c4q/demonstrations/Calculator.java @@ -0,0 +1,48 @@ +package nyc.c4q.demonstrations; + +import android.app.Activity; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; +import android.view.View; +import android.widget.EditText; + +import nyc.c4q.grocerystore.R; + +public class Calculator extends AppCompatActivity { + + private static final String FILENAME = "shared_preference_file"; + private static final String FIRST_TIME_OPENED = "boolean_key"; + private EditText mEditText; + + @Override + public void onCreate(Bundle savedInstanceState){ + super.onCreate(savedInstanceState); + setContentView(R.layout.greeting_calculator); + if (savedInstanceState == null){ + // first time app started + } else { + // Orientation change + } + mEditText = (EditText) findViewById(R.id.editText); + SharedPreferences sharedPreferences = getSharedPreferences(FILENAME,0); + boolean firstTimeOpened = sharedPreferences.getBoolean(FIRST_TIME_OPENED, true); + if (firstTimeOpened){ + showHelloToast(); + SharedPreferences.Editor editor = sharedPreferences.edit(); + editor.putBoolean(FIRST_TIME_OPENED, false); + editor.commit(); + } else { + showSeenYouBefore(); + } + + } + + private void showSeenYouBefore() { + mEditText.setText("Seen you before"); + } + + private void showHelloToast() { + mEditText.setText("Hello new user"); + } +} diff --git a/app/src/main/java/nyc/c4q/grocerystore/StoreDirectory.java b/app/src/main/java/nyc/c4q/grocerystore/StoreDirectory.java new file mode 100644 index 0000000..68228d0 --- /dev/null +++ b/app/src/main/java/nyc/c4q/grocerystore/StoreDirectory.java @@ -0,0 +1,149 @@ +package nyc.c4q.grocerystore; + +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; +import android.view.View; +import android.widget.Button; + +import java.util.Arrays; +import java.util.List; + +import nyc.c4q.grocerystore.bagleShop.Bagels; +import nyc.c4q.grocerystore.bakery.MilasBakery; +import nyc.c4q.grocerystore.butcher.GenericsButcherShop; +import nyc.c4q.grocerystore.coldCase.TenBelow; +import nyc.c4q.grocerystore.employeeHandbook.EmployeeHandbookActivity; +import nyc.c4q.grocerystore.freezer.FroZone; +import nyc.c4q.grocerystore.hotBar.HotMeat; +import nyc.c4q.grocerystore.pizzaShop.JohnsonsPizzeria; +import nyc.c4q.grocerystore.sushiShop.SushiYa; + +public class StoreDirectory extends AppCompatActivity{ + private Button mGotoBakery; + private Button mGotoBagels; + private Button mGotoButcher; + private Button mGotoColdCase; + private Button mGotoFreezer; + private Button mGotoHotBar; + private Button mGotoPizzaShop; + private Button mGotoSushi; + private Button mGotoEmployeeHandbook; + private List