Skip to content
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

Jackie Ho - Address-book hw #6

Open
wants to merge 1 commit into
base: master
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
11 changes: 11 additions & 0 deletions AddressBookHw.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
19 changes: 19 additions & 0 deletions src/BusinessContact.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Created by JHADI on 3/24/16.
*/
public class BusinessContact extends Contacts {

public BusinessContact(String name, int number) {
super(name, number);
}

@Override
public void call() {
System.out.println("Get it done now!");
}

@Override
public void pickUpCall() {
System.out.println("It's a pleasure doing business with you.");
}
}
36 changes: 36 additions & 0 deletions src/Contacts.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Created by JHADI on 3/24/16.
*/
public abstract class Contacts {
int mCellPhoneNumber;
String mName;

public Contacts(String name, int number){
mCellPhoneNumber = number;
mName = name;
}

public interface Text{
public void sendText();
};
public abstract void call();
public abstract void pickUpCall();

public int getmCellPhoneNumber() {
return mCellPhoneNumber;
}

public void setmCellPhoneNumber(int mCellPhoneNumber) {
this.mCellPhoneNumber = mCellPhoneNumber;
}

public String getmName() {
return mName;
}

public void setmName(String mName) {
this.mName = mName;
}


}
19 changes: 19 additions & 0 deletions src/FamilyContact.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Created by JHADI on 3/24/16.
*/
public class FamilyContact extends Contacts {

public FamilyContact(String name, int number) {
super(name, number);
}

@Override
public void call() {
System.out.println("For better or worse, we're stuck together");
}

@Override
public void pickUpCall() {
System.out.println("Yes mom, I understand.");
}
}
23 changes: 23 additions & 0 deletions src/PersonalContact.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Created by JHADI on 3/24/16.
*/
public class PersonalContact extends Contacts implements Contacts.Text{
public PersonalContact(String name, int number) {
super(name, number);
}

@Override
public void call() {
System.out.println("Baby, we can work this out.");
}

@Override
public void pickUpCall() {
System.out.println("Let's go tonight");
}

@Override
public void sendText() {
System.out.println("You ready yet?");
}
}