Skip to content
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
6 changes: 5 additions & 1 deletion src/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path=""/>
<classpathentry kind="output" path=""/>
</classpath>
4 changes: 4 additions & 0 deletions src/AnimalNoises.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//added semicolon to the end of import (Andrew Steele 01/10/2023)
import model.Example;
import model.Phoenix;
import model.Platypus;

import model.Dog;
Expand All @@ -23,6 +24,9 @@ public static void main(String[] args) {
Cat jordan = new Cat("Jordan",6,true);
System.out.println(jordan.getName() + " Age: " + jordan.getAge() + " Is Loved: " + jordan.getIsLoved());
System.out.println(jordan.getName() + ": " + jordan.speak());

Phoenix wright = new Phoenix();
System.out.println(wright.makeNoise());
}

}
61 changes: 61 additions & 0 deletions src/model/Phoenix.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* @author Adell - amrogers5
* CIS175 - Spring 2023
* Jan 16, 2023
*/
package model;


public class Phoenix {
//Three properties
private String name;
private int numIncarnations;
private boolean isMythical;

//Constructors
public Phoenix() {
super();
}

public Phoenix(String name, int numIncarnations, boolean isMythical) {
super();
this.name = name;
this.numIncarnations = numIncarnations;
this.isMythical = isMythical;
}

//Getters and Setters
public String getName() {
return name;
}

public int getNumIncarnations() {
return numIncarnations;
}

public boolean getIsMythical() {
return isMythical;
}

public void setName(String name) {
this.name = name;
}

public void setNumIncarnations(int numIncarnations) {
this.numIncarnations = numIncarnations;
}

public void setIsMythical(boolean isMythical) {
this.isMythical = isMythical;
}

//Methods
@Override
public String toString() {
return "Phoenix [name=" + name + ", Incarnations=" + numIncarnations + "lives, Is Mythical=" + isMythical + "]";
}

public String makeNoise() {
return "Objection!"; //Sorry, I couldn't resist an Ace Attorney: Phoenix Wright reference!
}
}