diff --git a/HW_05-01/.idea/compiler.xml b/HW_05-01/.idea/compiler.xml new file mode 100644 index 00000000..a8523149 --- /dev/null +++ b/HW_05-01/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/copyright/profiles_settings.xml b/HW_05-01/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/HW_05-01/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/HW_05-01/.idea/description.html b/HW_05-01/.idea/description.html new file mode 100644 index 00000000..db5f1295 --- /dev/null +++ b/HW_05-01/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/HW_05-01/.idea/encodings.xml b/HW_05-01/.idea/encodings.xml new file mode 100644 index 00000000..d8210482 --- /dev/null +++ b/HW_05-01/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/misc.xml b/HW_05-01/.idea/misc.xml new file mode 100644 index 00000000..ccf24ce4 --- /dev/null +++ b/HW_05-01/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/modules.xml b/HW_05-01/.idea/modules.xml new file mode 100644 index 00000000..d2dde6bf --- /dev/null +++ b/HW_05-01/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/project-template.xml b/HW_05-01/.idea/project-template.xml new file mode 100644 index 00000000..1f08b887 --- /dev/null +++ b/HW_05-01/.idea/project-template.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/HW_05-01/.idea/scopes/scope_settings.xml b/HW_05-01/.idea/scopes/scope_settings.xml new file mode 100644 index 00000000..922003b8 --- /dev/null +++ b/HW_05-01/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/uiDesigner.xml b/HW_05-01/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/HW_05-01/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/vcs.xml b/HW_05-01/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/HW_05-01/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/HW_05-01/.idea/workspace.xml b/HW_05-01/.idea/workspace.xml new file mode 100644 index 00000000..e69a869e --- /dev/null +++ b/HW_05-01/.idea/workspace.xml @@ -0,0 +1,943 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1430083781755 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HW_05-01/HW_05-01.iml b/HW_05-01/HW_05-01.iml new file mode 100644 index 00000000..d5c07432 --- /dev/null +++ b/HW_05-01/HW_05-01.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Animal.class b/HW_05-01/out/production/HW_05-01/hw0501/Animal.class new file mode 100644 index 00000000..c45d3ab6 Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Animal.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Cards.class b/HW_05-01/out/production/HW_05-01/hw0501/Cards.class new file mode 100644 index 00000000..12c4d10a Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Cards.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Character.class b/HW_05-01/out/production/HW_05-01/hw0501/Character.class new file mode 100644 index 00000000..717de720 Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Character.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Domestic.class b/HW_05-01/out/production/HW_05-01/hw0501/Domestic.class new file mode 100644 index 00000000..4ae28b6e Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Domestic.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/DomesticCat.class b/HW_05-01/out/production/HW_05-01/hw0501/DomesticCat.class new file mode 100644 index 00000000..2cd12c6c Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/DomesticCat.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Game.class b/HW_05-01/out/production/HW_05-01/hw0501/Game.class new file mode 100644 index 00000000..f6086b5c Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Game.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Main.class b/HW_05-01/out/production/HW_05-01/hw0501/Main.class new file mode 100644 index 00000000..df2a908a Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Main.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/MyCharacter.class b/HW_05-01/out/production/HW_05-01/hw0501/MyCharacter.class new file mode 100644 index 00000000..6866b884 Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/MyCharacter.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/MyRoom.class b/HW_05-01/out/production/HW_05-01/hw0501/MyRoom.class new file mode 100644 index 00000000..9dd38d44 Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/MyRoom.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/MyWeapon.class b/HW_05-01/out/production/HW_05-01/hw0501/MyWeapon.class new file mode 100644 index 00000000..e598ceff Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/MyWeapon.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/PlayingCards.class b/HW_05-01/out/production/HW_05-01/hw0501/PlayingCards.class new file mode 100644 index 00000000..ae702cd8 Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/PlayingCards.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Room.class b/HW_05-01/out/production/HW_05-01/hw0501/Room.class new file mode 100644 index 00000000..1c3a92ec Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Room.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/UseWeapon.class b/HW_05-01/out/production/HW_05-01/hw0501/UseWeapon.class new file mode 100644 index 00000000..f86b26f2 Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/UseWeapon.class differ diff --git a/HW_05-01/out/production/HW_05-01/hw0501/Weapon.class b/HW_05-01/out/production/HW_05-01/hw0501/Weapon.class new file mode 100644 index 00000000..af8ebc6d Binary files /dev/null and b/HW_05-01/out/production/HW_05-01/hw0501/Weapon.class differ diff --git a/HW_05-01/src/hw0501/Animal.java b/HW_05-01/src/hw0501/Animal.java new file mode 100644 index 00000000..12b75a52 --- /dev/null +++ b/HW_05-01/src/hw0501/Animal.java @@ -0,0 +1,38 @@ +package hw0501; +import java.util.ArrayList; +import java.util.Collections; + +/** + * Access Code 2.1 + * Ray Acevedo + * Animal.java + */ + +public class Animal implements Comparable +{ + String speciesName; + public Animal(){} + public Animal(String speciesName){} + public void setSpeciesName (String speciesName){speciesName = this.speciesName;} + public String getSpeciesName(){return speciesName;} + + + public static void putInAlphabetical (Animal a, Animal b) + { + ArrayListanimals = new ArrayList(); + animals.add(a); + animals.add(b); + Collections.sort(animals); + for(Animal animal:animals){ + System.out.println(animal); + } + } + + @Override + public int compareTo(Animal animal) + { + return speciesName.compareTo(animal.getSpeciesName()); + } + + public static void main(String[] args){} +} \ No newline at end of file diff --git a/HW_05-01/src/hw0501/Cards.java b/HW_05-01/src/hw0501/Cards.java new file mode 100644 index 00000000..e597a27a --- /dev/null +++ b/HW_05-01/src/hw0501/Cards.java @@ -0,0 +1,38 @@ +package hw0501; + +/** + * Access Code 2.1 + * Ray Acevedo + * PlayingCards.java + */ + +public class Cards +{ + String suite; + int cardNumber; + + + public Cards(){} + + public Cards(String suite, int cardNumber) + { + this.suite = suite; + this.cardNumber = cardNumber; + } + + public void setSuite(String suite) + { + this.suite = suite; + } + + public String getSuite() {return suite;} + + public void setCardNumber(int cardNumber) {} + + public int getCardNumber() + { + return cardNumber; + } + + public static void main(String[] args){} +} \ No newline at end of file diff --git a/HW_05-01/src/hw0501/Character.java b/HW_05-01/src/hw0501/Character.java new file mode 100644 index 00000000..70e788bd --- /dev/null +++ b/HW_05-01/src/hw0501/Character.java @@ -0,0 +1,14 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * Character.java + */ +public abstract class Character +{ + String name; + Weapon weapon; + int height; + int weight; +} + diff --git a/HW_05-01/src/hw0501/Domestic.java b/HW_05-01/src/hw0501/Domestic.java new file mode 100644 index 00000000..4913f9b9 --- /dev/null +++ b/HW_05-01/src/hw0501/Domestic.java @@ -0,0 +1,12 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * Domestic.java + */ +public interface Domestic +{ + public void setName (String Name); + + public String getName(); +} diff --git a/HW_05-01/src/hw0501/DomesticCat.java b/HW_05-01/src/hw0501/DomesticCat.java new file mode 100644 index 00000000..d37ba84e --- /dev/null +++ b/HW_05-01/src/hw0501/DomesticCat.java @@ -0,0 +1,41 @@ +package hw0501; +import java.util.ArrayList; +import java.util.Arrays; + +/** + * Access Code 2.1 + * Ray Acevedo + * DomesticCat.java + */ +public class DomesticCat extends Animal implements Domestic +{ + private String name; + private String species; + + + public DomesticCat (){} + public DomesticCat (String name){} + public DomesticCat (String name, String species){ + this.name=name; + this.species=species; + } + @Override + public int compareTo(Animal animal) + { + animal = new DomesticCat(); + DomesticCat domesticCat = (DomesticCat) animal; + return name.compareTo(domesticCat.getName()); + } + + @Override + public void setName(String Name) + { + this.name=name; + } + + @Override + public String getName() + { + return name; + } +} diff --git a/HW_05-01/src/hw0501/Game.java b/HW_05-01/src/hw0501/Game.java new file mode 100644 index 00000000..aba93280 --- /dev/null +++ b/HW_05-01/src/hw0501/Game.java @@ -0,0 +1,14 @@ +package hw0501; +import java.util.ArrayList; + + +/** + * Access Code 2.1 + * Ray Acevedo + * Game.java + */ + +public abstract class Game +{ + protected abstract ArrayList getPieces(); +} diff --git a/HW_05-01/src/hw0501/Main.java b/HW_05-01/src/hw0501/Main.java new file mode 100644 index 00000000..2763ae86 --- /dev/null +++ b/HW_05-01/src/hw0501/Main.java @@ -0,0 +1,16 @@ +package hw0501; + +/** + * Access Code 2.1 + * Ray Acevedo + * Main.java + */ + +public class Main { + public static void main(String[] args) { + + } +} + + + diff --git a/HW_05-01/src/hw0501/MyCharacter.java b/HW_05-01/src/hw0501/MyCharacter.java new file mode 100644 index 00000000..c342f656 --- /dev/null +++ b/HW_05-01/src/hw0501/MyCharacter.java @@ -0,0 +1,34 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * MyCharacter.java + */ +public class MyCharacter extends Character +{ + public MyCharacter (){} + + public MyCharacter (String name){} + + public MyCharacter (String name, Weapon weapon, int height, int weight){} + + public void setName (String name){ + this.name=name; + } + + public String getName(){ + return name; + } + + public void setWeapon (Weapon weapon){this.weapon=weapon;} + + public Weapon getWeapon(){return weapon;} + + public void setHeight(int height){this.height=height;} + + public int getHeight(){return height;} + + public void setWeight(int weight){this.height=weight;} + + public int getWeight(){return weight;} +} diff --git a/HW_05-01/src/hw0501/MyRoom.java b/HW_05-01/src/hw0501/MyRoom.java new file mode 100644 index 00000000..1c182b08 --- /dev/null +++ b/HW_05-01/src/hw0501/MyRoom.java @@ -0,0 +1,26 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * MyRoom.java + */ +public class MyRoom extends Room +{ + public MyRoom (){} + + public MyRoom (String name){} + + public MyRoom (String name,int area){} + + public void setName (String name){ + this.name=name; + } + + public String getName(){ + return name; + } + + public void setArea (int area){this.area=area;} + + public int getArea(){return area;} +} diff --git a/HW_05-01/src/hw0501/MyWeapon.java b/HW_05-01/src/hw0501/MyWeapon.java new file mode 100644 index 00000000..be54147c --- /dev/null +++ b/HW_05-01/src/hw0501/MyWeapon.java @@ -0,0 +1,22 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * MyWeapon.java + */ +public class MyWeapon implements Weapon +{ + String name; + int bullets; + + + public MyWeapon (){} + + public MyWeapon (String name, int bullets){} + + @Override + public void fireWeapon(Weapon weapon) + { + System.out.println("Bang!"); + } +} diff --git a/HW_05-01/src/hw0501/PlayingCards.java b/HW_05-01/src/hw0501/PlayingCards.java new file mode 100644 index 00000000..be429c19 --- /dev/null +++ b/HW_05-01/src/hw0501/PlayingCards.java @@ -0,0 +1,46 @@ +package hw0501; +import java.util.ArrayList; + +/** + * Access Code 2.1 + * Ray Acevedo + * PlayingCards.java + */ +public class PlayingCards extends Game +{ + ArrayList cards = new ArrayList(); + + + public PlayingCards() //creates a deck of cards + { + ArrayList suits = new ArrayList(); + suits.add("Clubs"); + suits.add("Hearts"); + suits.add("Spades"); + suits.add("Diamonds"); + for(String suite : suits) + { + for(int i = 1; i < 14; i++) + { + Cards card = new Cards(suite, i); + this.cards.add(card); + } + } + } + + @Override + public ArrayList getPieces() + { + return cards; + } + + public static void listPieces(ArrayList arraylist) + { + for(Cards card : arraylist) + { + System.out.println(card.getSuite() + card.getCardNumber()); + } + } + + public static void main(String[] args){} +} diff --git a/HW_05-01/src/hw0501/Room.java b/HW_05-01/src/hw0501/Room.java new file mode 100644 index 00000000..2f5d6454 --- /dev/null +++ b/HW_05-01/src/hw0501/Room.java @@ -0,0 +1,11 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * Room.java + */ +public abstract class Room +{ + String name; + int area; +} diff --git a/HW_05-01/src/hw0501/Weapon.java b/HW_05-01/src/hw0501/Weapon.java new file mode 100644 index 00000000..8eb10335 --- /dev/null +++ b/HW_05-01/src/hw0501/Weapon.java @@ -0,0 +1,10 @@ +package hw0501; +/** + * Access Code 2.1 + * Ray Acevedo + * Weapon.java + */ +public interface Weapon +{ + public void fireWeapon (Weapon weapon); +} diff --git a/exercises/.DS_Store b/exercises/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/exercises/.DS_Store differ diff --git a/exercises/.idea/.name b/exercises/.idea/.name new file mode 100644 index 00000000..f60f1fc3 --- /dev/null +++ b/exercises/.idea/.name @@ -0,0 +1 @@ +exercises \ No newline at end of file diff --git a/exercises/.idea/compiler.xml b/exercises/.idea/compiler.xml new file mode 100644 index 00000000..a8523149 --- /dev/null +++ b/exercises/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/exercises/.idea/copyright/profiles_settings.xml b/exercises/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..e7bedf33 --- /dev/null +++ b/exercises/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/exercises/.idea/encodings.xml b/exercises/.idea/encodings.xml new file mode 100644 index 00000000..d8210482 --- /dev/null +++ b/exercises/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/exercises/.idea/exercises.iml b/exercises/.idea/exercises.iml new file mode 100644 index 00000000..d6ebd480 --- /dev/null +++ b/exercises/.idea/exercises.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/exercises/.idea/misc.xml b/exercises/.idea/misc.xml new file mode 100644 index 00000000..7ca410e9 --- /dev/null +++ b/exercises/.idea/misc.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7 + + + + + + + + 1.7 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/exercises/.idea/modules.xml b/exercises/.idea/modules.xml new file mode 100644 index 00000000..7d2682d1 --- /dev/null +++ b/exercises/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/exercises/.idea/scopes/scope_settings.xml b/exercises/.idea/scopes/scope_settings.xml new file mode 100644 index 00000000..922003b8 --- /dev/null +++ b/exercises/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/exercises/.idea/vcs.xml b/exercises/.idea/vcs.xml new file mode 100644 index 00000000..6564d52d --- /dev/null +++ b/exercises/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/exercises/.idea/workspace.xml b/exercises/.idea/workspace.xml new file mode 100644 index 00000000..2c9cfc80 --- /dev/null +++ b/exercises/.idea/workspace.xml @@ -0,0 +1,470 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1430439586493 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/AndroidManifest.xml b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/AndroidManifest.xml deleted file mode 100644 index 832d95e8..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/DialerActivity.java b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/DialerActivity.java deleted file mode 100644 index 09e62463..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/DialerActivity.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.example.accesscode.myphone; - -import android.app.Activity; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; - -/** - * Created by amyquispe on 4/30/15. - */ -public class DialerActivity extends Activity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_dialer); - Button callButton = (Button) findViewById(R.id.call_button); - final EditText dialerText = (EditText) findViewById(R.id.dialer_text); - callButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - /* get text input */ - String phoneNumber = dialerText.getText().toString(); - - /* - Use an implicit intent to open the user's phone app to call this number. - http://developer.android.com/guide/components/intents-common.html#Phone - */ - } - }); - } -} diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/EmailActivity.java b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/EmailActivity.java deleted file mode 100644 index 24934ce9..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/EmailActivity.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.example.accesscode.myphone; - -import android.app.Activity; -import android.os.Bundle; -import android.view.View; -import android.widget.Button; -import android.widget.EditText; - -/** - * Created by amyquispe on 4/30/15. - */ -public class EmailActivity extends Activity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_email); - final EditText emailSubject = (EditText) findViewById(R.id.email_subject); - final EditText emailBody = (EditText) findViewById(R.id.email_body); - Button mailButton = (Button) findViewById(R.id.mail_button); - mailButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - String myEmailAddress = ""; /* put your email address here */ - String subject = emailSubject.getText().toString(); - String body = emailBody.getText().toString(); - - /* - Use an implicit intent to open up the user's email program and send - and email with this subject and body to you. - - http://developer.android.com/guide/components/intents-common.html#Email - - */ - } - }); - } -} diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/MainActivity.java b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/MainActivity.java deleted file mode 100644 index 2e0460c9..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/java/com/example/accesscode/myphone/MainActivity.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.example.accesscode.myphone; - -import android.support.v7.app.ActionBarActivity; -import android.os.Bundle; -import android.view.Menu; -import android.view.MenuItem; -import android.view.View; -import android.widget.Button; -import android.widget.Toast; - - -public class MainActivity extends ActionBarActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - /* DialerActivity */ - Button dialerButton = (Button) findViewById(R.id.dialer_button); - dialerButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Toast.makeText(getApplicationContext(), "Dialer clicked", Toast.LENGTH_SHORT).show(); - /* - Use Explicit Intent to start DialerActivity here. - */ - } - }); - /* EmailActivity */ - Button emailButton = (Button) findViewById(R.id.email_button); - emailButton.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Toast.makeText(getApplicationContext(), "Email clicked", Toast.LENGTH_SHORT).show(); - /* - Use Explicit Intent to start EmailActivity here. - */ - - } - }); - } - - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - // Inflate the menu; this adds items to the action bar if it is present. - getMenuInflater().inflate(R.menu.menu_main, menu); - return true; - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - // Handle action bar item clicks here. The action bar will - // automatically handle clicks on the Home/Up button, so long - // as you specify a parent activity in AndroidManifest.xml. - int id = item.getItemId(); - - //noinspection SimplifiableIfStatement - if (id == R.id.action_settings) { - return true; - } - - return super.onOptionsItemSelected(item); - } -} diff --git a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/res/layout/activity_dialer.xml b/exercises/5_OOP-and-Intents/MyPhone/app/src/main/res/layout/activity_dialer.xml deleted file mode 100644 index d4bc14d3..00000000 --- a/exercises/5_OOP-and-Intents/MyPhone/app/src/main/res/layout/activity_dialer.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -