-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from sydneyhauke/fb-all-instruments
[G4] Instrument implementations
- Loading branch information
Showing
8 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Lute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
public class Lute implements IInstrument { | ||
private static final String sound = "tingting"; | ||
private static final int volume = 10; | ||
private static final String color = "brown"; | ||
|
||
@Override | ||
public String play() { | ||
return sound; | ||
} | ||
|
||
@Override | ||
public int getSoundVolume() { | ||
return volume; | ||
} | ||
|
||
@Override | ||
public String getColor() { | ||
return color; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Lyre.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
//@author Tano Iannetta | ||
class Lyre implements IInstrument { | ||
|
||
private String sound = "drlingdrling"; | ||
private int volume = 10; | ||
private String color = "golden"; | ||
|
||
public Lyre(){ | ||
} | ||
|
||
public String play() | ||
{ | ||
return sound; | ||
} | ||
public int getSoundVolume() | ||
{ | ||
return volume; | ||
} | ||
public String getColor() | ||
{ | ||
return color; | ||
} | ||
|
||
|
||
} |
20 changes: 20 additions & 0 deletions
20
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Mallet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
/** | ||
* Implementation of Mallet | ||
* @author Remi Jacquemard | ||
*/ | ||
public class Mallet implements IInstrument { | ||
|
||
public String play() { | ||
return "stomp"; | ||
} | ||
|
||
public int getSoundVolume() { | ||
return 10; | ||
} | ||
|
||
public String getColor() { | ||
return "blue"; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Mandolin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
/** | ||
* | ||
* @author SILVERCORP | ||
*/ | ||
public class Mandolin implements IInstrument { | ||
|
||
private String color = "golden"; | ||
private int soundVolume = 10; | ||
|
||
public Mandolin() { } | ||
public String play() { return "zing";} | ||
public int getSoundVolume() {return soundVolume;} | ||
public String getColor() { return color;} | ||
|
||
|
||
} |
35 changes: 35 additions & 0 deletions
35
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Maracas.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
/** | ||
* @author Loan Lassalle | ||
*/ | ||
|
||
|
||
public class Maracas implements IInstrument | ||
{ | ||
String sound; | ||
int soundVolume; | ||
String color; | ||
|
||
public Maracas() | ||
{ | ||
sound = "TshTsh"; | ||
soundVolume = 17; | ||
color = "wood"; | ||
} | ||
|
||
public String play() | ||
{ | ||
return sound; | ||
} | ||
|
||
public int getSoundVolume() | ||
{ | ||
return soundVolume; | ||
} | ||
|
||
public String getColor() | ||
{ | ||
return color; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Marimba.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
/** | ||
* Created by Colin Lavanchy on 28.02.17. | ||
*/ | ||
public class Marimba implements IInstrument { | ||
@Override | ||
public String play() { | ||
return "dumdumdum"; | ||
} | ||
|
||
@Override | ||
public int getSoundVolume() { | ||
return 15; | ||
} | ||
|
||
@Override | ||
public String getColor() { | ||
return "brown"; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Mellophone.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
/** | ||
* | ||
* @author Lemdjo | ||
*/ | ||
/*Add implementation for Mellophone*/ | ||
public class Mellophone implements IInstrument{ | ||
public Mellophone() {} | ||
|
||
public String play() { | ||
return "Pouet"; | ||
} | ||
int getSoundVolume(){ | ||
return 0; | ||
} | ||
String getColor(){ | ||
return "Golgen"; | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
Lab00App-build/Lab00App-code/src/main/java/ch/heigvd/res/lab00/Melodeon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ch.heigvd.res.lab00; | ||
|
||
/** | ||
* | ||
* @author Aurelie Levy | ||
*/ | ||
public class Melodeon implements IInstrument { | ||
public String play() { | ||
return "Tralala"; | ||
} | ||
|
||
public int getSoundVolume() { | ||
return 5; | ||
} | ||
public String getColor(){ | ||
return "white"; | ||
} | ||
} |